Currently in 5.1 when you engage in a pet battle if you cancel the fight the pets you were fighting despawn. This is particularly frustrating if you mistakenly kill a battle pet that you wanted to capture.
So instead of forfeiting queue for a scenario while in the pet battle.
Accept the scenario when it pops.
Leave instance
Engage in pet battle with newly re-poped battle pet that you were fighting before.