I notice that whenever a baby mob climbs up a block in a 1 or 2-block high gap, they tend to take damage whenever there's a block above them. (take baby piglins for example). This also applies to baby Drowned whenever they swim up and touch a block (which is just above the water) that's above them.
Duplicate of MC-163673