Affirmative action is by design discriminatory, but not against nationality. It's discriminatory based on race and sex. So I think your grudge is not striking the right target. And in any case, affirmative action has been mostly wound down, which began to happen when Obama was President. Not because he did anything, but because SCOTUS declared that his election was evidence that affirmative action was no longer required and thus ruled against it in new cases.
It was so wound down that 6 years after Obama left office, whites were 0.54x under-represented in the Ivy League, despite having SAT scores close to the groups that were ~5x over-represented: https://archive.org/details/ivy_league/
An expected outcome of still having explicit affirmative action hiring/admission criteria in 2025: https://www.city-journal.org/article/harvard-university-disc...
I think the main reason so few US citizens get PhDs is because PhD "student" (they're actually workers) positions pay so poorly. Make PhD student positions have non-poverty wages and you'll see a lot more interest from US citizens.
On the flip side, I think foreign students experienced a lot of abusive conditions that I could more easily say no to because I didn't have a visa that required me to work at the university. I've seen some of that first hand. I don't mean to imply that there would be no cost to me saying no, just that I wouldn't have to leave the country if I said no.