Mobs and Entities are misplaced when leaving and reentering a World this happens on my survival world on my horse inside the house and a trapped villager I have seen other people experiencing this too and I think putting mobs inside a closed space will teleport it outside after leaving and reentering it
Related issues
Comments

Thank you for your report! This issue was, however, submitted at an earlier time as MCPE-14769. You may add any information you find relevant in the comment section there.