That's certainly true, but nothing about Spain in the early 19th century makes me think they can hold onto Louisiana.
Would they even want to? On the one hand,
@Xenophonte has a good point: no Napoleon means no hugely weakened Spain. Furthermore, it means no forced Spanish loyalty to France, and thus no British backing for revolutionaries in the Spanish Empire. On the contrary: if we wish to assume 'no Napoleonic wars
and no distracted Britain', as per the OP, then we should assume that no equivalent wars take place either. which probably means the French revolutionaries get crushed by a monarchist alliance shortly after Napoleon fails to seize power. An alliance which would include Britain and Spain, presumably-- making them clear allies for the moment.
This gives us a much stronger Spain, and undistracted Britain, and presumably a Britain that
does not want any hanky-panky in the western hemisphere. Nevertheless, there already was discontent in the Spanish Empire. Spain will want to retain its empire, and may well succeed (at least in considerable part, and for the time being). Yet at the same time, we have the US, which wants New Orleans and Florida. (The US, in OTL and presumably in this ATL,
won't initially be interested in grabbing up the vast Louisiana Country.) Spain can dedicate lots of resources to fighting the US over those relative backwaters it never settled properly anyway... or...
Well,
or it can sell them. I'd imagine the British wouldn't actually interfere against the US in case of war, but they'd likely give very strong hints that they'd prefer a peaceful solution. So the US may well offer to buy New Orleans and Florida, and possibly a modest strip of land extending along the west bank of the Mississippi. The Spanish, fighting revolutionaries in their more important colonies, and actually standing a chance of winning, would be very tempted. Sell off backwaters to gain money to fund campaigns in core territories? That's a no-brainer! (N.B. They'll actually get the payment later, of course, but being assured that the money is forthcoming allows Spain to run up the war debt correspondingly.)
It's even possible that Spain would make the same choice Napoleon made in OTL, and try to sell much more land than the US initially wants to buy... because they'd get more money in exchange for pretty much unsettled land they've got no use for.