The British lost twice when they invaded in the Nineteenth Century
and the Porteno victories depended on far more than just one (of several) commanders (Liniers) who although French by birth, was a Spanish royalist, and loyal to the crown enough he ended up being shot for it.
Going to the Eighteenth Century means you have to find a point where a) Spain would be willing to surrender the River Plate territories as part of a peace treaty, and b) the British would be willing to accept it, especially given the distance, and their focus on North America; it is also worth considering the fact the Viceroyalty of the Río de la Plata was both the last and most short-lived of the Spanish viceroyalties; there's a reason it took until 1776 to be created.
Going to the Seventeenth Century makes it even more unlikely that a) and b) would come into allignment.
Going to the Sixteenth Century makes it even more difficult.
Best,