To set max viewport in Node Puppeteer, we set the --window-size option.
For instance, we write
const browser = await puppeteer.launch({
headless: false,
args: ["--window-size=1920,1080"],
defaultViewport: null,
});
to call launch to launch the browser.
We set args to ["--window-size=1920,1080"] to make the window size 1920×1080.