hi iI had the same problem with my chromedriver using pythonPython and options.add_argument("headless")options.add_argument("headless") did not work for me, but then iI realized how to fix it so iI bring it in the code below:
opt=webdriveropt = webdriver.ChromeOptions()
opt.arguments.append("headless")
i hope it works for you.