I haven't tried it with a mob other than a zombie and a drowned but it seems like they can still hit a player when they're 2.5-3 blocks away when they're in a boat.
How to reproduce:
Start a creative world.
Spawn a zombie using a spawn egg.
Place a boat and push the zombie into the boat on surface.
Switch to survival mode.
Try to get close to the zombie.
Observation:
The zombie will be able to hit you despite being about 3 blocks away from you.
Related issues
Comments

Thank you for your report!
We're actually already tracking this issue under MCPE-48539 so I've requested this report be resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
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