This issue should have been fixed by now. IIRC, it was fixed in either 5.3 or 5.4.
From personal experience, my pets keep whichever abilities I choose for them. There isn't an option (that I know of) that turns this function on or off. It should be on by default.
If you're experiencing any pets reverting back to default abilities each time you swap them in and out of your active pet team, report it as a bug. They should be retaining whichever abilities you last chose for them, even when moving them to and from your team.
Feel free to browse through Perks N Peeves
, my vanity pet collecting blog!