Can you quit during the Play of the Game and still get it? Or when the cards are shown, but before the XP screen? Or do you have to wait past everything?
XP and SR is awarded the moment the Victory/Defeat animation plays.
At this point, you will appear as "In Game: Match Ending" to friends. This is the moment where the "Open Lootbox" option appears, assuming the game you've just played resulted in a level up. In competitive, it is also the moment where quitting no longer results in penalties.
After quitting, it is possible your state will still be "In Game: Match Ending" for a moment longer than your client, especially on faster computers. If you queue again immediately, your first attempt might automatically cancel when you transition from "In Game: Match Ending" to "In Menus". This is more noticeable if you've brought a group with you when you leave. Just wait a few seconds and try again. This is still significantly faster than waiting through PotG, MVP, and award animations.