What would be the czar's motivation for attacking Sweden? The 'best' result for Sweden might actually be if this led to a world war or pan-European war earlier than the OTL WWI.
Let's say that the POD is that in this timeline, the ATL 'Dogger Bank incident' occurs earlier in the Skagerrak or just east thereof, with the Russian Baltic Fleet instead mistaking small fishing ships or other civilian vessels from Germany for Japanese torpedo boats. In the ensuing blind-firing, they hit one another as OTL in addition to sinking some German vessels.
Unlike OTL, when the Russians gave in to the British demands in a limited way and gave up some of the officers responsible and paid reparations, their admiralty might in this timeline opt to save face and insist that they did fight torpedo boats and claim that either Germany was harbouring Japanese torpedo boats or that it was German vessels they had fought.
During the ensuing standoff between the two empires, the captain of a Russian destroyer or torpedo boat mistakes the
Norwegian naval jack of a vessel heading for Sweden's Berga naval base for the flag of the
Kaiserliche Marine in the twilight. Believing that this is a German ship clearly out of German waters and part of a battlegroup preparing to attack St Petersburg while the bulk of the Baltic fleet is gone, he opens fire. Due to a combination of not expecting to be hit and sheer (bad) luck, the vessel starts sinking, but manages to radio for help. Nearby Swedish ships arrive in time to save at least some of the crew and some of them pursue the russian vessel to impound it and demand an answer. The belligerent captain instead decides to fight them, in the end being sunk after inflicting more damage.
With the first casualties being Norwegian, the war might breathe life into the personal union at least long enough that another personal union with Finland would at least be seriously considered.
Yes, this scenario requires the Russians to hold tightly onto an idiot ball, but in my defense their naval officers really did so OTL.