Pretty much what Admiral Brown (nice name) said. Most of the Upper Peru (save for La Paz) declared its support for the May Revolution and the Buenos Aires Junta, but it was quickly overran by Spanish armies coming from Peru. Argentina was never able to re-occupy the Upper Peru (there were 3 different expeditions to the Upper Peru, all of them ended up failing) until a guy named San Martín took command of the Northern Army, looked at the situation, said "fuck Upper Peru we are never breaking through that", left a local Caudillo in charge of waging guerrilla warfare in Salta to keep the Spanish away, and proceded to cross the Andes and declare the independence of Chile and later Peru proper.
It doesn't help that Sucre, the person who liberated the Upper Peru once and for all, was a commander in Bolivar's army, and that by 1825, when Bolivia was declared independent, Argentina had collapsed into civil war and what was effectively warlordism. This made the idea of joining Argentina again (which was a possibility considered by some) extremely unattractive.
The best way to have Bolivia remain part of Argentina, in my opinion, would be to avert the collapse of the Argentinian State and the Anarchy of the Year XX (which dissolved the Northern Army), and instead, when Sucre is leading his campaign into the region, have the Northern Army join the offensive from the south, meeting the Bolivarian army. Or just have the Spanish be much more incompetent at suppressing the initial recognition of the Buenos Aires Junta in 1811 and 1812.