Should the webdriver fix be set to undefined instead of false?
navigator.webdriver returns true in headless chrome, but in normal browsing it doesn't return false. It is undefined in the browser.
It seems like setting it to false is actually a tip off that headless mode is being concealed, because it isn't false in a normal browser.
This seems to work:
await page.evaluateOnNewDocument(() => {
Object.defineProperty(navigator, 'webdriver', {
get: () => undefined,
});
});