when ever you summon a pet or have one already out for warlocks at least, they go from full health to half health if you mount on flying mount and fly up and land again. (max lvl 70 and only on flying mount as I know of)
It will sometimes not do it if you don’t land for a long time but that’s like maybe 10 mins though I’m not sure how long you have to wait to not let it bug out. But that is often to long to wait when questing or doing dailies to wait for a pet not to bug out.
This causes a lot of issues with world PvP as a warlock that is spec for using pets, warlocks need there pet to survive in PvP. As far as I know it’s been in game since TBC classic started.