You can tax business at home by land/revenue/resources usage/ip protection taxes. As it is owners in different jurisdictions pay a different (or sometimes no) tax on selling shares. Selling itself is something you want to encourage, not discourage. It's a pointless tax that penalizes exactly the things you want to encourage.
You think that someone moving to Portugal to avoid it is unfair but then a share holder living in 0 cap gain jurisdiction in the first place would pay 0 anyway.