That needs to be a bug because the points where enemy respawn or can wander are set up that he can't attack the player in front of the door and find him until he moves a bit. You can hide in wall holes or just run away. He has a short view up and down.