When the player is attacked by a Phantom in a close area next to any type of pet that is sitting, The pet will stand and teleport to the player, Note that the pet will not attack the Phantom just teleport to the player. This does not affect pets that are a certain distance away from the player. Can confirm this happens to parrots, cats, and wolves.
Thank you for your report!
However, this issue is a Duplicate of MC-696.
If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki