For most practical purposes, except for the matters of the foreign policy, Portugal remained an independent state (in other words, the colonies and trade arrangements were Portuguese, not Spanish) and Dutch-Portuguese War of 1601–1661 overlapped with Portuguese Restoration War of 1640 - 1668 (John, 8th Duke of Braganzawas acclaimed as King John IV of Portugal on December 1st, 1640) fought against Spain. Aka, there was no help from Spain after 1640 by a simple reason of it being at war with Portugal.
I other words, for most practical purposes, except those that really matter, because it was enough to sour the Portuguese-Dutch relations enough to both countries entering a war.
Now, what could Spain do while Portugal was still a part of the union? Very little: It did not have too much in the terms of a navy (unlike Portugal and the Dutch Republic)
True, in fact, it is so true that it is exactly why I think that ITTL Spain is not going to care about the River Plate, that is the reasoning behind my argument in post #11.
However, they actively participated in recapture of Bahia in 1624 (Portugal provided 22 ships and about 4,000 men, Spain 38 ships, among them 21 galleons, and 8,000 men).
Probably military matters weren't included in most practical purposes...
Now about the losses. When the dust settled Portugal retained most of its colonial empire: they recovered their colonies in Brazil and Angola and the Dutch failed to replace Portuguese in the trade with China. The main Dutch gain was setting a colony in Java (which was formally independent) but Portuguese retained East Timor. So the "huge swats of land" exist mostly in your imagination and whatever was taken was not taken from the King of Spain: the Dutch made peace with Portugal (1661) which, just like the Dutch, was at war with Spain.
The King of Spain was the King of Portugal when Portugal lost huge swats of land in Brazil, Africa and elsewhere, after Portugal became independent again they reconquered it without Spanish help, in fact despite Spanish hostility, that is why "the Spanish King lost huge swats of land to the Dutch".