The following baby mobs:
Husks
Piglins
Zombies
Zombie villagers
Zombified piglins
take damage when jumping up a ledge if there is a solid block two blocks above it.
The attached image shows where the block should be placed in order to damage the baby mob.
Attachments
Comments

Duplicates MC-160706, though the image and description is clearer.
Confirmed for 1.15-pre1.

that happens with all the baby mobs i've seen this one in logdotzips

Drowneds can be added too.
I specifically tested drowneds and they didn't seem to be affected at all.

This has been a bug for years. I reported it but was a duplicate report. It happens with any 1 block talk mob. Chickens take damage when they jump into a 1 block opening. They never fixed it. This should be a high priority bug fix considering it has been in the game for years.
How long a bug has been in the game does not necessarily correspond to how high the priority for fixing it is.

sometimes happens in bedrock edition too

@unknown please search for this report in Minecraft Bedrock (MCPE) project and if you can't find it report it there

this also applies to rabbits if they touch a block with their heads they take damage and since they just to get around they suffocate to death
Can confirm in 20w51a.
Can confirm in 21w03a.