Some mobs, in this case, the Panda, Horse, Iron Golem, camel, hoglin, zoglin, mule, turtle, skeleton horse, ravager, sniffer, polar bear, and zombie horse, upon spawn (or perhaps just upon spawn with an egg), get damaged by walls, and become it (which is some odd phrasing but i am unsure of which words to use).
Thank you for your report!
We're actually already tracking this issue in MC-103934, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote or any additional information to the main ticket it would be appreciated.
Please be sure to use the search feature before creating a ticket to see if the issue has already been reported.
Quick Links:
📓 Bug Tracker Guidelines – 🛠 Community Support – 📧 Mojang Support – ✍️ Feedback and Suggestions – 💬 Mojira Discord