Not sure if this has been posted anywhere else but I've just tested this and it works. This is a similar to the alt+f4 method that used to work before bliz fixed/patched it.
1) Set WoW to Full Screen Mode (not windowed)
2) Open wow and any other window (browser, etc).
3) Start a pet battle, then click Forfeit (u can forfeit at any point during the match), then click Okay and right away Alt+Tab (windows key works too) out of the WoW window (must be done right away or this trick won't work- do it right away when clicking Okay), wait about 20seconds (if u go back to your wow window before the 15-20secs is up then this trick won't work) then go back to your WoW window and the pet should still be there (same quality, same pet).
Useful if u accidentaly killed a rare or want to have a friend come over a catch the same rare pet. Also useful for those who hunt rare minfernals/scourged whelpings but don't wanna despawn the pets in doing so.
When u alt tab it normally pauses the pet battle but when u forfeit there's slight delay before the battle is actually forfeited and so pausing that won't work and so the battle is basically canceled.