If an entity, specifically a PlayerBase or Man is shot at but in the EEHit method you restore the entities health from the TotalDamageResult to each health zone, the player stays alive and receives no damage. Once you headshot the player, even if you restore the brain health the object always returns true for IsDamageDestroyed() - It seems that once a fatal wound is received the entity is marked as damage destroyed but it no longer honors health system values.
I imagine this is the intended functionality but it does not work out if you are trying to make unkillable NPCs or safezone type mods.
After restoring the entity health even after a fatal injury the player visually is alive and can still interact in the world. However since IsDamageDestroyed is always true now, IsAlive is false and this causes issues like being able to loot the player, player character data destroyed if the player logs out or server restarts.
In addition, the SetAllowDamage() in Object class does not appear to have any effect.
Maybe I am approaching this wrong, and if so maybe you can advise on a better way to keep a player/npc alive in game even if hit.
See steps to reproduce for some code you can try out to see what I mean