Use puppeteer-extra-plugin-stealth. Note that you will need to use puppeteer-extra rather than just puppeteer for this to work. Found this solution through this article.
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());