Summary: When a Player is riding a boat, their hitbox will be the same as a Player that is not riding a boat, causing the Player's hitbox to extend below the boat itself and make them vulnerable to underwater attacks. You can see this in third person view.
1. Press F3 + B to enable hitboxes.
2. Find a body of water, preferably an Ocean. (Deep Ocean is not recommended)
3. Place a boat and ride in it.
4. Press F5 for third person view.
5. Pay attention to the white lines below the boat, those white lines are the Player's hitbox.