What would happen if Peru-Bolivia stays Spanish and becomes the end of the century independent?Would it still fall apart?
Depends.
My first instinct it´s say there is no Way Peru and Alto Peru, continue in Spanish hands, after Nueva Granada, La plata, Paraguay and Chile are de Facto Independents, as all the newly independent countries consider that Peru in the hands of the Spanish is a too big threat to maintain their independence as is a ready advance base for any try of Reconquest from Spain to allow the country not be free., So the first think the new republic do, after have a secure home base was Launch "Expediciones libertadores" to Peru.
In the case that Spain, somehow, maintain the Control Over Peru and Alto Peru, they will have to fight a lot againts all the independent countries that have no interest in a diplomatic resolution of the limits, Chile will try to push as the northern they can, Paraguay will push to annex the Chaco and, if they can, for Santa Cruz, Argentina, will push for Jujuy and the Closest to Potosi they can, Colombia, an later Ecuador will push for the Southern most frontier they can.
So you will end with a Larger country overall but smaller than the OTL independent Peru and Bolivia