I'm not sure I understand the asterisks in your post and what his dying has to do with Mlle Hjortsberg, unless he died a la Louis XII.
And for a while I wondered if he could marry Sophie Vilhelmina of Sweden or even let Carl XIII's daughter, Lovisa Hedvig survive. But Sophie's born in 1801, and Lovisa died in 1797 (which brings me to a separate question, Carl XIII and his wife were married in 1774, but their first documented kids are Lovisa in '97 and Carl Adolf (4.7.1798-10.7.1798), why the 23 year gap? Carl had a bastard son by Christina Augusta Fersen in 1772, so clearly he didn't have problems). Also, how did inheritance in Sweden work, they'd had two queens regnant already, but Carl XV's daughter was never groomed for the throne (in fact, I read somewhere that he wanted to change the law to let her succeed

).
But as to Anna Pavlovna as queen of Sweden, I don't think very likely. Gustav IV and her oldest sister were gonna get married and her religion was an issue. Catherine the Great didn't see why Alexandra couldn't stay Orthodox but Gustaf and the Swedish riksrad/privy council refused to allow her to practice her Orthodoxy in private.