That's the point. Instead of effortlessly being able to copy tech that's handed to them, they're going to have to spend time, money and talent to just catch up. While that's happening it isn't as though ASML and others will be standing still, and they won't have to make a national espionage project out of their attempts.
Sanctions are about adding cost and friction, not some magical ideal of totally boxing countries off.