(1). why not just make it painful to be a foreigner there. Raise taxes on rent/property if you're foreign by 3-4x (or whatever makes sense after an analysis of building new housing from foreigner tax dollars). If you don't want to scare off the ones already there then make it not retroactive. People like to make these situations tougher than they need to be. Mostly it's impossible because politicians are paid off by the 1% (foreign and domestic). The Portuguese have a right to enjoy their country without foreigners coming in and buying it off and pushing them to the edge of poverty. Globalism has got us in a tenuous situation in the West depending completely on the likes of China for our style of living. I can understand the Portuguese being angry with the situation.
> why not just make it painful to be a foreigner there
In a country with a TFR of ~1.4 and a median age of ~47. What could possibly go wrong? It's not like Portugal is seeing a declining population or anything. Oh, wait.