Villagers shouldn't disappear when enclosed in a space like described above that they cannot escape from. However, when I leave and go to a different area (on the same map) for one in-game day, then return, some of the villagers are gone. This is bad because the population decreases. This happens inside buildings and related structures.
Thank you for your report!
However, this issue has been closed as a Duplicate of MCPE-8002.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki