> think the US (and probably Germany too) is an outlier here because of the number of immigrants who arrive to study STEM degrees
"About 30 percent of STEM degree holders living in the United States are immigrants" [1].
So sigificant as a fraction of immigrants. But not particularly meaningful to the trend. (I suspected the effect you hypothesise might exist within countries. But alas, higher-income households produce more STEM graduates [2].)