Pet returning to default
It’s been posted about several times before.
You can use Google to search for similar threads/posts (instructions found in a couple of Stickies). I can’t remember if there is a solution.
You can contact the CS Team via the ‘Support’ link above/below if you continue to have issue.
Good luck.
Perhaps you’ve got better luck in searching than i do? I’ve found nothing close to this issue.
Here are just a few that came up on a search:
https://forum-en.gw2archive.eu/forum/professions/ranger/Starter-pet-bug
https://forum-en.gw2archive.eu/forum/professions/ranger/Ranger-pet-bug
https://forum-en.gw2archive.eu/forum/support/bugs/Ranger-pets-keep-changing/first#post6459171
Good luck.