If you see this error in your project, make sure that you add this in the beginning of your file:
import com.microsoft.playwright.options.Proxy;
Sometimes even with the playwright.* line the proxy options aren’t loaded.