I was playing on survival and in my village my population was knocked down to 2, so I trapped the villagers and waited for them to make a baby.
The baby escaped in the night, so I tried to encase it in blocks (sandstone in my case). I did, but a couple of minutes later I saw the baby running around. Indeed, the baby had escaped its confines.
How to reproduce:
1. Spawn a baby villager
2. Trap it in solid blocks (sandstone, dirt, etc.)
3. Wait a minute or two, walking around if desired
The baby will not be in the cage, and will be running around if it is not dead.
This is not a duplicate of the baby animals escaping fences glitch, as it has to do with escaping solid blocks and not fences.