I attempted to scrape a website that has a bot-blocker from cloudflare using this code:
with SB(uc=True, headless2=True) as sb:
for url in urls:
sb.uc_open_with_reconnect(url, 5)
sb.uc_gui_handle_captcha()
There was an error:
Exception: PyAutoGUI can't be used in headless mode!
How can I pass the CAPTCHA in headless mode without PyAutoGUI? Or is there an alternative way to solve this problem?

I have tried many approaches, like using cookies, virtual display etc., and nothing worked.