The "white males" bit is not useful/helpful. But US resident vs non is probably a bit.
There are several layers to this.
Layer one is that SW Eng work has always been both multi modal and that it's never been easy to get out of the trash distributions (e.g. $40-$60k "analyst" or "programmer" gigs, etc.) if you end up there. And it's also never been easy for someone to get a degree and find a job w/o having internships, years of part time work or other experience, or connections.
Anecdata, but a solid number of my CS graduating class more than a decade ago who were more than good enough to work in CS struggled to figure out how to find a first position if they didn't happen to have gotten internships, worked in the field before graduation, etc. While the best off got Google or MS internships that the majority of my class didn't even apply for. And even then, the majority of the jobs were for 4+ years of experience.
Add to this over the past decade many outfits have started to hire substantial numbers of overseas remote workers. For the most part, I think many companies fill their junior and slightly up roles with outside of the US remote workers. This has mixed results, but it's usually cheaper to hire several foreign remote workers over one domestic worker, and particularly in cases where time consuming grunt work is needed it can work reasonably. In some ways the H1-B doesn't matter because you can always hire remote foreign workers. The main issues I've seen relate to there being a substantial management load to deal with the amount of stuff lost in translation. I've personally had a better experience w/ South American contractors than Russian/Ukrainian/Slavic or Indian, I think because the timezones match better, English/Spanish/Portuguese seems to be easier to navigate linguistically, and the workers have seemed to better understand what we've needed and been better at showing initiative for some reason.
Then layer AI on top of this and relatively reduced hiring.
I do not think it's a good time to be looking for work, and with every year that's gone by over the least decade it's been worse for junior/early career roles especially.
I haven't seen white males being let go in favor of foreigners, but I have seen a lot of limiting hiring to a few seniors and filling the rest with overseas to save money. AI is only exacerbating. As is the fact that nobody really seems to have money for hiring. So is the desire to hire people who are magically already perfect and spun up for a role, no matter how niche.
In general, I think "white male" is a red herring.