As a sibling comment points out, there is still significant fab capacity in the US.
There are a LOT of things to untangle. The first thing is the difference between leading edge fabrication, and everything else. If you look at this wiki list of active fabs (https://en.wikipedia.org/wiki/List_of_semiconductor_fabricat...), you'll see lots of plants still building stuff at 45nm+, and a large chunk building in 22-45nm.
There are only 3 main leading edge manufacturers', TSMC, Intel, and Samsung (I'm discounting Global Foundry since they publicly announced they're not chasing smaller process nodes). All of them concentration their fabs in their home country. Intel has some fabs in Ireland (I don't really know why..), Israel (Intel's Israel team is top-notch and a real contributor to Intel's success, so I guess that makes sense), and one in China (cause that's the world we live in). All of Intel's leading edge plants (10 and 7nm) are in the USA.
Of the non-leading edge plants, you'll also find that the majority of companies also concentrate their fabs in their home country, with American companies being a bit more dispersed. I would evaluate that the majority of fabs reside in a company's home country. I wager a bunch of the greater American dispersion comes from mergers/acquisitions. There's been a lot consolidation in the chip industry (at every level and vertical) in the last few decades.
I think what you're seeing isn't so much companies moving their fabs off shore. What you have is that most companies are no longer willing to invest their own R&D into pushing fabrication processes, so they stop building new fab plants, and instead look for a fabrication house to buy from. And today there's really only one choice, TSMC, which happens to be Taiwanese.