Mobs Attack Through Walls

I’ve had this happen with incredible frequency - for some reason aggressive mobs are quite fond of clipping into my house and attempting to kill me. It’s like my walls aren’t even there.
Clearly there’s something going on with the collision checks - maybe they were disabled for performance? It’s kind of irritating to be minding my own business when suddenly a wolf notices me and starts attacking me - through my wall.
Sometimes they just barely stand outside enough that their hitbox isn’t in my house, but they can still hurt me - so I can’t even do anything about it.
They should be performing some kind of line-of-sight detection to see if the attack can even hit me. They should also lose interest if there is no line of sight for X amount of time.
As it is I’m getting quite tired of fending off wolves which have clipped into my wood hut.