This is probably a “working as intended” bug, it’s still a bug as far as I am concerned.
When a hunter or forger is attacked by their work hut/cabin, instead of seeking shelter there, they try and flee to their wherever their permanent home is. This frequently results in their death as whatever is assailing them has multiple opportunities to bite/stab/shoot them in the back on their long journey home. What is the point of having a temporary shelter if you do not actually use it to shelter in?