Originally, Portugal wasn't supposed to go so far west, per their agreement with Spain. Westward exploration kept creeping Brazil westward til Spain and Portugal came to an agreement, with exchanges of territory. If Spain doesn't go into a death spiral, Spain might be more enthusiastic about kicking the Portuguese out.
Have the Dutch hold on to New Holland.
https://en.wikipedia.org/wiki/Dutch_Brazil They'll probably expand, perhaps taking all of the Amazon.
Have the French Antarctique colony survive and expand.
Perhaps Lopez is a better general and succeeds in the Paraguayan War, or gets the Argentines to join him. He would likely take a lot of territory
Perhaps Argentina is more successful in the Cisplatine War and takes a lot of the Rio Grande do Sul area.
Brazil managed to wrangle the Acre state away from (drawing a blank) former Spanish colony. Or they aren't so successful in expanding the northern borders at the expense of Venezuela and the guianas. Or French Guiana manages to expand like they attempted.
Brazil did rather well for itself, considering how many opportunities it had to fail.