If you change the structure of the Union to make it a unitary state like the U.K rather than a personal Union, then it might hold.
The personal union is said to be a product of Bernadotte feeling that Sweden was too unstable with four of its previous top men being murdered or deposed, so instead of merging Norway with Sweden, he let the Norwegians keep their new separate system so he could have a secure realm somewhere if things got bad.
Before that, there was a war with Swedish forces attacking Norway, and their political objective should have been to make Norway a part of Sweden, since Swedish Pomerania had been incorporated administratively into Sweden by Gustavus IV a few years earlier, and Norway was first in exchange for that, although the Norwegian objections changed the circumstances.
What? That's a terrible idea! The Norwegians would never have accepted to be fully integrated into Sweden and it would probably have led to an even quicker end to the Union. If anything, centralisation attempts by the King and their obstruction to reforms in Norway seriously alienated the Norwegians from the union.
With a fully Swedish Norway, and no separate Norwegian institutions from 1814 onwards, it would not have been so easy to leave Sweden as ending the Union in 1905, even if most of the Norwegians wanted to. (Someone should make a timeline for that scenario.) Of course there would be local provincial administration under Sweden too, and if the Norwegian members of the Swedish parliament walks out and posit themselves as the Norwegian parliament, then we would have something of a 1905-situation, except that the Norwegian state would have to split from Sweden in a lot of small-scale cases that were already separate in OTL, such as dividing the military forces. (If ATL Sweden actually accepts separatism, that is.)
In my opinion, the Union would have been more stable had the Swedish realm done the transition to parliamentarism and constitutionalism earlier. A more liberal Sweden would have been more keen to preserve the Union and see it as one of Equals rather than the Conservatives' attempt at subjugating Norway. Plusn the Norwegian liberals would have been less anti-union later on.
If the Swedish revolutionaries of 1809 had been more like their Norwegian counterparts of 1814, this might have been the case.
EDIT: Now I saw that this was post 1900, with all cards being dealt, and all players as OTL, so ... darn, whatever could save the union then? Someone posits 1940 events before the Norwegians of 1905, so they decide to stay.