Boats can float under water beneath non full level block water columns.
- Build a setup as shown in Setup.png
- Remove the sandstone
- Place a boat under water
→ It floats
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.