If you enter a boat from crawling position and the boat is on solid blocks, then you will take suffocation damage.
I believe this is related to:
Although this bug is slightly different, since you don't get the xray effect and your hitbox and player model appear in the correct position.
I am unable to reproduce this issue in 1.17 Pre-release 4.