Saw this in the tags and wanted to comment...
No. The Section 31 Changeling Virus did NOT win the war.
What lost the Dominion the war was the following:
The mining of the wormhole and later the Prophets closing access to it for the Dominion meant they could no longer get reinforcements from the Gamma Quadrant.
Their brutal occupation of Cardassia as their primary forward base in the war and seat of power in the Gamma Quadrant led to an uprising against them.
The Founders were not used to outright warfare because they ruled through threat in the Gamma Quadrant, so their method of dealing with the various threats was either subterfuge and manipulation from the inside or through shows of overwhelming force to dominate their opponents into subjugation. That is a tactic that decidedly does NOT work on the cultures of most alien species in the Alpha/Beta Quadrants. Instead of just saying "Resistance is futile", they showed you by carpet bombing a planet. In the Gamma Quadrant, this show of force was enough to force compliance but in the Alpha/Beta Quadrants they act as rallying points to fight back harder.
The increased paranoia and vindictiveness of the Female Changeling in charge of the Dominion led to her making decisions that went against all tactical and strategic sense for her own self-preservation and need to punish those around her. This led to more and more conservative military strategies and over-reliance on technological advantages like the alliance with the Breen and their shield-bypassing weapons that were later subverted. Rather than fighting an offensive war, the Dominion began laying strategies specifically knowing they were losing solely to make the act of winning as painful as possible on their opponents.
That last point means Section 31's virus made a peaceful end to the war impossible.
The reason the Female Changeling was so paranoid and turtling up was because she and her people were under a genocidal biological attack from the enemies she was fighting. There was no chance whatsoever for negotiations or trust because her people were dying directly because of the Federation. Meaning there was no way whatsoever she would believe that the Federation or any of their allies were negotiating in good faith.
By the end, the war was over. The Dominion was stuck on Cardassia Prime. They'd amassed all their defenses there, and taking Cardassia would've been a blood and destructive battle. Or the Federation, Romulans, and Klingons could have set up a blockade and allowed the siege to eventually win the battle. However, this would have also cost lives as the Dominion attempted to break the siege and it would have caused countless deaths (not only of soldiers but of civilians as well) through starvation and disease. Either way, The Dominion's power base in the Alpha/Beta Quadrants was broken, but it would be a long, slow, bloody process to eventually get peace.
Providing the cure to the Changeling virus is what allowed peace to happen while avoiding that senseless loss of life.
The cure that Section 31 worked very, very hard to prevent that as an option, even cajoling/blackmailing Starfleet Medical itself into becoming complicit in the genocidal attack. Bashir had to literally hack into Sloan's mind to retrieve the cure using super-experimental technobabble for that to be an opinion, and even then Sloan was prepared to fight to the bitter end to make sure the cure never made it out.
Odo - not a member of the Federation - negotiated the peace by providing the Female Changeling with the cure without precondition and then negotiated terms of surrender.
Section 31's actions made the war longer and bloodier.
Now there's one point I want to really address here.
"acting ethically requires greater sacrifice than acting pragmatically"
YES AND THAT IS THE POINT!!
The point is that it is worth the sacrifice to act ethically. To win the "right way" rather than the easy way. That is the whole point of Star Trek! Think back to almost every single episode of TOS and TNG and think about a pragmatic solution if you didn't care about morality or ethics. Those episodes would be 10 minutes long because the Enterprise could just open fire on the enemy ship or lay waste to their cities with orbital bombardment or beam in security officers with phaser rifles. The entire run of every Star Trek series is filled with moments where the crew could take the easy, pragmatic solution but choose to do things the hard way because it is also the ethical and moral way to handle the situation.
Holy hell, Deep Space Nine itself addressed this! The episodes "Homefront" and "Paradise Lost" were specifically about compromising morals and ethics for pragmatic solutions and how that is bad.
If Section 31 is in Star Trek and they are remotely presented as in the right or in any way justified, they are being used wrong.