It depends how Sweden wins.
If Charles XII accepts Russia's peace offer in 1707 (retroceding all Russian-occupied territories except St. Petersburg), the Swedish Empire might survive. Russia achieves its major objective of a Baltic port and thus may not feel a second round of hostilities a few years later would be worth it, and Sweden holds its gains against Poland, Saxony, and Denmark and avoids its massive manpower losses from later in the OTL war.
If Charles's invasion of Russia succeeds in forcing Peter to make peace on terms favorable to Charles, I have a hard time seeing that ending well for Sweden. Even a victorious invasion of Russia would be costly, and Sweden lacked the resources to occupy enough territory long-term to stop Russia from coming back a few years later for another round. Eventually, Russia would grind Sweden down.
If Charles's death at Fredriksten is averted and his campaigns succeed well enough to force favorable peace terms, that's a Pyrrhic victory for Sweden. By that point, the cost of fighting (in both lives and money) had become absolutely ruinous for Sweden. So long as the coaltion against them kept reforming, it's only a matter of time before Sweden's luck would run out.