PC, Dedicated Server with mods.
Thralls do not not return to their guard positions after agro-ing on something. Once in a while they return, but usually they just position at their last kill spot. This is an old, ongoing bug that needs attention.
Also, thralls will enter and exit buildings when all doors are closed. Please make the “return to guard position” something that works reliably.