Everybody need to meet this new requirement (danish citizens, EU-citizens and non EU-citizens).
But the new rule will be more difficult to fulfill for non-EU citizens compared to EU-citizens, because only EU-citizens can include periods with stays in other EU/EEA-countries.
Non-EU citizens can only include periods with stay in Denmark or another nordic country.
The exemptions in the new law, where stay outside EU/EEA do not have negative impact, can be used by anyone (EU or non-EU citizen).
One of them is periods (during the last 12 years) where one have been studying outside EU/EEA. However this exception can only be used if you were staying in Denmark immediately before the education was begun.
In this case even studies outside Denmark/EU will still be counted as stay inside Denmark, when calculating the "7 out of 12 years". (in 2019 only 5 out of 12, and in 2020 6 of out 12).
This must be seen as part of the current Government attempt to make new laws that attract high educated people to Denmark.
I assume that you were not reciding in Denmark before the studies you have completed in a non-EU country. So the years with study can not be counted in meeting the 5 out of 12 years residency condition in 2019.
Anders Weber, www.a-kasser.dk