I've been experiencing this issue for many times. (Named)Mobs or mobs in general (like farm cows) despawn when I go offline playing and go back to online mode again. Even named villagers keep despawning despite having houses. The same goes for my horses. Once I go back to my horse, I can only see a leash on the fence but with no mob latched on. I tried restarting both the game and my phone but nothing happened, they were still gone. It seems like the mob data aren't saved in the storage.
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 – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki