My villager goes to be in its house, and Ill close the fence gate im using as a door to keep him safe while i build the rest of the village. But then ill go to sleep and ill wake up to him outside the house with the gate still closed!
I've managed to fix it for now by rearranging the interior of the house (removing the carpet and moving the bed) but i don't believe this to be an intended feature in the game
I've attached an image of the interior of the house and where he would spawn in relation to the bed
Related issues
duplicates
Attachments
Comments

Thank you for your report!
We're actually already tracking this issue in MC-68200, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki