When a player initiates a fight while being in an area that the mob cannot get to, it immediately goes invulnerable to prevent players from just standing there and killing it. I’m not sure if that’s what is happening here since it’s occurring so frequently, but it may be something along those lines. Maybe the mob’s pathing is messed up and it believes the player is out of reach?