The bug
Items dropped underwater when the block above seamlessly connects to the waters surface will bypass the block's collision and float inside it. They do not proceed to the surface after entering a block, they simply clip inside, bobbing up and down as though it's reached air.
Linked issues
Comments 4
Still relevant in 1.15.1, though the items only clip into blocks visually. Using F3+B to show hitboxes reveals that the items don't actually clip into the blocks above them, which is why they can still be collected.
This report actually appears to be a duplicate of MC-160217, as this is a more active and updated ticket.
Confirmed 1.13. Item can still be retrieved by approaching the block.