Hostile mobs, when named with a name tag or, in the case of zombies, given an item and named, will randomly despawn after some time. They are usually kept in minecarts that are unable to move. There seems to be no specific reason for the despawns, it seems to be up to random chance whether or not a named mob will despawn. We have also seen issues with passive mobs kept in cages and such despawning.
Related issues
Comments

Thank you for your report!
We're actually already tracking this issue at MCPE-21416, so I will resolve and link this ticket 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:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki