The bug
Based on 3 Glitches with Boats- 1.12 Vanilla Survival
Boats can float under water beneath non full level block water columns.
How to reproduce
- Build a setup as shown in Setup.png
/fill ~1 ~ ~1 ~17 ~ ~17 sandstone /setblock ~9 ~1 ~9 flowing_water
- Remove the sandstone
/fill ~1 ~ ~1 ~17 ~ ~17 air
- Place a boat under water
→ It floats
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
It appears the method net.minecraft.block.BlockLiquid.getBlockLiquidHeight(IBlockState, IBlockAccess, BlockPos) does not return the correct height in the affected situation.
It is not clear whether this method should act differently or if the affected water blocks should not be there in this situation.
There might be other causes as well.