I noticed that zombies (scarecrows/murderers) do not de-aggro sleepers.

It seems that OnNpcTarget doesn't get called for them. I was able to get it sort of working via OnNpcTargetSense, but there seems to be a slight delay before they stop attacking.

Here is my attempt. Also I added safe zone checking and better null protection in a few places:
https://pastebin.com/fQgfBtaw