The TVtropes page for Xanatos Gambit defines it mainly as a plan where no mater what happens the planner wins. I think there is some accuracy to that, but from my analysis of the plans done by the Trope Namer, and the other villain who's most strongly linked to this Trope, Palpatine in The Star Wars Prequels. I think it could be more accurate to say that what the Heroes are dealing with isn't the main plan at all, and the villain has got what he wanted by the time the heroes even start fighting the immediate threat.
In fact I'd say not only does the Heroes succeeding at their immediate objective not hurt his plan, it is if anything preferable, since they've just tied up a potential lose end for him.
This trope defines most of what Palatine does in the Prequels, but perhaps when viewed in hindsight it is most interesting to look at it in Episode I.
Palpatine's only goal in this film is to become Chancellor via a vote of no Confidence in the current one. Any other ways events of this film play into the following Episodes are him taking advantage of those developments. But the goal here was just to become Chancellor.
Number 1, that means his plan is arguably dependent on the Queen making it to Corusant. He could have called for the vote himself in response to something tragic happening to her like being forced to sign a treaty, but her doing it helps keep his hands cleaner.
Now some critics of the film I've seen think he genuinely really wanted the Treaty signed because of what he says to Newt. The Trade Federation leaders are not in on his real plan. In the long run he was going screw them over no mater what, they probably didn't know Sidous was Palpatine. Signing the treaty would not have hurt because then he could point out it was obviously signed under coercion.
One criticism is how the Trade Federation could have honestly thought such a Treaty would be held up. But that's what shows the manipulative persuasive power of Sidious, he convinced them he'd make it legal, and maybe he could have but I'm certain he never intended too.
After calling for the vote, some people think he was genuinely trying to stop Amidala from going back to Naboo. He was trying to talk her out as part of the his mask, but he didn't actually care. His surprise at her making that decision could have been genuine, but it was in no way even hypothetically a threat, he'd already achieved his goal.
And then the Heroes succeeding in liberating Naboo on their own just means Palpatine doesn't have to worry about doing the first thing he was elected to do.
Even losing Maul wasn't a real loss to him, I suspect he already had his eyes on Dooku. And was certainly now putting them on Anakin. But Dooku's role was always going to be needed for phase two, even if not Dooku specifically the Separatist cause needed a respected Jedi. Maul was already a failed apprentice from Sidous viewpoint I suspect.
However early on Amidala could have made a decision that would have avoided Palpatine getting what he wanted. Though my pointing out this option may go against what we usually assume Lucas political agenda was, but I believe in Death of the Author. Either way it's overlooked simply because it's never verbalized.
That option was to not seek the Republic's help to begin with, since she wound up saving her planet with what the Planet already had all along, the key piece being the Gungan Army.
You might ask "How could Maul have been dealt with without the Jedi there?" but Maul wouldn't have been sent if the Jedi weren't there. Again pretty much the only role Sidious ever planed for him was to announce the Sith's existence to the Jedi, because he wanted them to know.
Now from a narrative standpoint I understand that she needed to meet and develop a friendship with Jar Jar in order to realize she had that option. (And that is why Jar Jar is in fact very important to the story, of this film as a stand alone, way more then Anakin or the Jedi.) But my observation still remains, she never needed the Republic.
Basically I'm of the view that a Galactic Government is a bad idea, period. I'm not sure Lucas would like that viewpoint, but it's one I'm able to interpret his work in support of.