How do they make photo lithography lens so accurate?
Actually, for the most part dust on the lens surface won't produce intolerable results at the wafer. At the lens surface the image being projected is not in focus, so a dust particle will not produce an image of the particle at the wafer.

The everyday example of this used to be called the "screen door effect", although don't bother to Google it - the meaning of the term has changed. It used to refer to the fact that a screen door can be optically opaque from a distance, but transparent up close. Put your nose up against a screen door and you can't see the screen pattern.

What you do see is a slight blurriness. This means that cleanliness is, as the saying goes, next to godliness, particularly in clean rooms. So a resist projector will undergo scrupulous cleaning before it is installed - it's just that a single speck on the lens surface is unlikely to cause significant issues.