So the chinese gov't will need to also invest in hardware production - and surely they are furiously doing so (and getting limited success, but success none the less).
The american chip sanctions is, in my view, an own-goal. In the short term, it might cause some pain, but in the medium to long term, it is the kick that the chinese market would need to adapt. Necessity is the mother of all inventions after all. It might take 10 years, but i have no doubts that china can reach a level equal to that of TSMC.
If the US administrations (both current and previous) had any brains, they should've seen this. They should've put subsidies into chips so that chinese production will not be competitive, and chinese firms will lose money if they go domestic. And the export of such hardware would balance the trade deficits.