Boats, boat with chest, bamboo raft or bamboo raft with chest can't be placed on top of fences, walls, and closed fence gates (when holding shift). With fence gates, it does place successfully when the fence is open.
This probably happens due to the fence's collision hitbox being 1.5 blocks tall while the hitbox used for targeting the block is a single block tall, meaning that the boat colides with the upper part of the fence's hitbox. This can be seen in-game when placing a boat on an open fence gate, as the boat appears on top of the gate rather than half a block above it.
Related issues
Attachments
Comments

Can confirm in 20w48a.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w13a.
Can confirm in 21w16a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.18.1.
Can confirm in 1.18.2.