This has happened to so many mobs and it is beyond a joke by this point. It also happened to both my parrots and both my dogs that were not on leads at all. They were named and had no way to despawn. Please fix this immediately, maybe in 1.17 on Tuesday. The mobs disappear when the realm restarts, like when i download a backup or load a texture pack. Or when the realm updates.
Related issues
Comments

Thank you for your report!
We're tracking this issue in MCPE-21416, 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 – 📖 FAQs
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit