The supply chain both in parts for their machines, but also in terms of research and technology for new machines is very deep and very international. If the US states that a technology can only be used by ASML if they keep R&D in the US, then there is no easy alternative for ASML.
That is true not only for ASML, but for the semiconductor industry in general. The number of smaller, specialized companies for certain tools, chemicals and software is staggering. And they sit all over the US, Europe, Japan, Taiwan and Korea.
One of the best examples of this is how TOTO the toilet company makes the electrostatic ceramic wafer chucks that hold wafers during processing.
https://www.youtube.com/watch?v=CIB49e_r1OI