When it comes to the Iberian Union, there's much discussion about how it impacted both the countries of Portugal and Spain. However, what's often overlooked is how the Iberian Union impacted the colonial empire of Portugal. Specifically, was the Iberian Union a net good or was it negative when it comes to the expansion of the Portuguese Empire? If you have a TL without it (Sebastian doesn't die in Morocco and has a heir), would the Portuguese Empire end up smaller (Would Brazil have been allowed to expand so much without the Union?) or would it be bigger, with even more colonies throughout the Americas, Africa, Asia and possibly Oceania?
As others have said, it was almost certainly a net negative.
The main issue was pulling Portugal into wars without appropriately investing in the Portuguese empire to protect it from the consequences of the war.
The Monarch saw the Portuguese empire as an extension of the Spanish empire, which while true on paper, ignored that it was structured in a fundamentally different way. The Spanish ran a settler empire, which could rely on a significant local population in most cases to avoid being taken over out of hand, and being difficult to hold for others.
The Portuguese ran a trade empire, with their factories having very small civilian populations compared to their garrisons, insignificant in most cases. They handled the flow of trade, and unless something catastrophic occurred, that trade *would* occur, regardless of whether the Portuguese were there. So other trade oriented nations, like the Netherlands or England, could move in and replace the Portuguese, just by taking over the factories with a siege.
Due to the ease of replacing Portugal, this meant that the Portuguese suffered major financial losses, while their enemies quickly made great gains, and thus the balance of power was shifted, and it would be incredibly difficult for Portugal to reclaim their lost outposts. Perhaps if Spain had dedicated itself to the task it would have been possible, but it didn't, focusing on European wars and affairs that had little bearing on Portugal's pre union foreign policy.
Also add in that one of their largest new enemies, the English, had been one of their closest allies, they were completely unprepared to deal with them.
Overall, during the Iberian Union period, Spain was heavily focused on European affairs, dealing with 2 major issues at once, the 80 years war and the 30 years war. They then diverted Portuguese strength and money to these affairs, and away from their empire, while giving their empire major new foes. So the empire was lost, and once lost Portugal was greatly weakened, and thus had not the strength to reclaim it, nor to influence Spain towards retaking it.
Looking at the big picture, the Iberian Union did not necessarily have to be a negative for the Portuguese empire. They had a lack of bullion, Spain had a surplus, so some fancy accounting and a colonial focus could have greatly benefited both parties. See great timelines such as Torbald's for what such a functional Iberian Union could look like.
However, the way it occurred historically, during the period of greatest continental focus for Spain, meant Portugal was going to shafted, unless Spain could be extremely successful in bringing down the Dutch. I'm not well informed on the particulars of the 80 years war, so I can't tell you if that's possible, but it's one way that the Portuguese could be better off. Even then, it's possible that less focus on the 80 years war means greater Spanish intervention in the 30 years war, which while loosing fewer colonies, could still bankrupt both parties, also leading to a Portuguese decline.
Overall, as long as the Iberian Union occurred in circumstances where Spain was focused on Europe, and Portugal on colonies, then Portugal would suffer, as it would face the brunt of Spain's many many naval enemies.
Edit: I just want to make it clear that I'm specifically talking about Portugal's empire in Asia, not Brazil or most of their African holdings. I'm sure everyone here can tell, but I wanted to avoid any unnecessary nitpicking