As a sports fan, I have heard this expression used many times for as long as I can remember. Instinctively, I know what it means:
pull out (phrasal verb) to win a contest, particularly as a surprising upset or as a result of a surprising comeback
That's why this phrase is commonly found in news stories such as:
The Patriots overcame a 25-point deficit midway through the third quarter to pull out the 34-28 win in overtime (CBS Sports, 2017)
Everyone would also have considered the 18-year-old as the underdog in her quarterfinal match against living legend Venus Williams. But once again, Andreescu pulled out an upset. (Baseline, 2019)
Yet you have astutely observed that other writers seem to use "pull off" to mean the same thing.
Patriots pull off stunner to win Super Bowl LI (Baltimore Sun, 2017)
How to pull off the upset in tennis against a favored opponent (The Buffalo News, 2019)
However, when I scoured the dictionaries for a definition corroborating this definition, I can't seem to find one.
I did find this on a language forum:
To pull off means to accomplish something unlikely.
I pulled off an A on the exam despite not studying.
We pulled off a win despite playing poor defense.
Also, this Ngram shows that both expressions are used. I also wonder if this is an Americanism, as I didn't see any hits on the Ngram when I changed the corpus to British English. Lastly, these expressions seem relatively new (very few hits prior to 1970), so maybe the dictionaries simply have some catching up to do.
One possible origin might be the aviation phrase "pull out of a nosedive", which might explain why the expression seems to get used a lot when the ultimate victor was trailing early in the contest.