When villagers and players are in a block without glass and covered inside a block they somehow are still able to pathfind them like they have x ray vision.
How to do:
Go on a creative world
build a windowless house
have a player in there or place a villager in
place a zombie near
the zombie will be able to pathfind the villager or player.
Thank you for your report!
However, this issue has been closed as Working as Intended.
If you need help or have a suggestion you might like to follow a link below.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki