Rare-earth is not lithography equipment that is super expensive and only a few items are sold per year. They are not even AI Chips, which are being smuggled by the 100s of thousands. For each ASML machine costing a few 100 million, you probably only need maybe 100 KG worth of Magnets. I am sure they will be able to source it, whether legally through some producers outside China or illegally through smuggling.
The rare-earth ban is mainly bad for large scale manufacturing industry. Chip production? Not so much. So, lets not get carried away about the Awesome superpower of the rare-earth controls. They are very impactful but not in these kinds of niche sectors.