"how European laws should not apply to open source companies"
Not going to happen. Closed source has to obey the laws of the countries where it sells, there is no reason to exempt open source from the same obligations simply because the sale price is zero.
Besides, it's not like it's a problem for the developers. You don't want your code to be GDPR-compliant ? Not a problem, your code won't be used in the EU. I don't think there are many non-EU developers who are bothered by that.
EU-centric developers, of course, will have to ensure that their code is GDPR-compliant, meaning that they'll have to amend whatever FOSS code they decide to use to ensure proper compliance. The burden is on them (apply to other countries/law structures as applicable).
But all code should be compliant with the laws of the country in which it operates.