>> Most of them are immigrants> This is false.
Doctorate means different things in different fields. In particular, getting a doctorate in Education or some of the applied Life Sciences fields looks more like a masters degree with a long paper at the end and you typically work full-time at a "real job". You or your employer may even pay your tuition. Ie, not the type of PhDs the article is talking about.
Digging into SED data, the "Citizen / Resident" numbers are propped up by two categories:
1. the applied biological sciences / health sciences, many of which do not resemble a traditional PhD program in any way.
2. education, which again functions very differently from a typical PhD program in every way: who pays, how they pay, what you're doing during and after, etc.
You can then track by field in the rest of the SED data and see that a huge number of these people aren't on the traditional academic track and are not doing a phd in the sense that most people in STEM mean; ie, they're working other full-time jobs, probably not publishing or barely publishing, never planning on going into academia afterwards, and so on.
--
More details: The NSF runs a survey of earned doctorates (SED) each year.
These reports include a table entitled "Research doctorate recipients, by detailed field of doctorate, citizenship status, ethnicity, and race: <year>". Let's look at 2021.
In Computer Science, 953/1545, or about 62%, were Temporary visa holders.
That's a lower bound! The other category includes permanent residents and the survey happens at the end of the PhD. Many PhD students receive permanent resident status during their PhD -- particularly those from places other than India and China, or who immigrated to the US prior to starting their PhD (eg for undergraduate or work). There are a variety of pathways, bu suffice it to say that many people end those 6 years no longer on a temporary visa.
Additionally, there are about 100 PhDs in 2021 that reported neither "citizen / permanent resident" or "temporary visa", who are almost certainly majority immigrant who don't (or at least don't think) they fall into either category.
All-in, I've seen estimates that up to 70% of earned doctorates in Computer Science are awarded to immigrants.
For all earned doctorates these numbers are closer to 33%, so flipped in the opposite direction. But if you start breaking down by field you will notice that the vast majority of fields where citizens are over-represented are exactly the fields where "PhD study as research assistant/TA" is less of thing and full-time employment during the PhD is much more common/feasible.