The bug
When you sleep in a bed, you will set your spawn point there and will also spawn there upon leaving the end using the portal. However this doesn’t apply to villagers. When they sleep in a bed, then go to the end and leave it, they will still spawn at the world spawn point and not at their bed. This is an inconsistency, since players spawn at their bed.
How to reproduce:
Create a new world
Go some blocks away from the world spawn point
Place a bed
Run /time set night
Spawn a villager, so that he sleeps
Run /time set day
Get the villager into an end portal (You can use the tp command)
Kill the ender dragon
Get the villager into the end portal to the overworld
❌ The villager will spawn at the world spawn point like all other non-player entities.
Expected result: The villager will spawn at the bed that he slept.
Hi there!
I can confirm for 1.16.3.