Steps to reproduce:
Build a 6x6x6 room with opaque block walls.
Add a small entrance to the room (door, fence gate)
Spawn an Iron Golem into the room.
Aggravate him (punch) and quickly leave the room.
Stand next to one of the exterior walls of the room.
The Iron Golem will hit you through the wall.
Thank you for your report!
We're actually already tracking this issue at MCPE-55790, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
I've added your steps to reproduce to the main ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki