Entities randomly despawn in large numbers when logging in and out of the game. This includes villagers, passive mobs I have bred, villagers (nametagged and traded with), hopper mine carts, paintings, armor stand with armor and items, nametagged hostile mobs (ravagers specifically), nametagged skeleton horses, bees, and tamed wolves and cats. All entities have been confined to single chunks and are unable to cross chunk borders. It seems to happen during updates, when the game crashes, or other instances of logging out without using the βsave and continueβ option.
Related issues
Comments

Thank you for your report!
We're tracking this issue in MCPE-144208, so this ticket is being resolved and linked 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 to see if the issue has already been mentioned.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki