I'm running a test process using Cucumber, Selenium and Capybara for the screenshots.
I'm passing these arguments to the browser instance (removing the =new in the --headless argument to get the Old Headless Mode to trigger.
options.add_argument('--headless=new')
options.add_argument('--start-maximized')
options.add_argument('--disable-popup-blocking')
options.add_argument('--disable-extensions')
options.add_argument('--window-size=1960,1080')
options.add_argument('--disable-features=VizDisplayCompositor')
options.add_argument('--user-data-dir=C:\FourthTest')
To demonstrate this, when I remote desktop to my test running system, I'm forcing it to use 800x600 resolution. Headless mode, as far as I can tell, should not care about my screen resolution. The old headless mode does not care about my resolution, and as you can tell from the OldHeadless Screenshot PNG I'm attaching here, the browser window is using 1960 by 1080 pixels. The NewHeadless Screenshot PNG is at 804x487 pixels, which appears to be an artifact of the browser taking the Windows Taskbar into account for the browser window size(?).
If I set my remote desktop window to a larger resolution than 1960x1080, then everything works as expected for both modes. However, we have a CI process where regression tests are run automatically by Jenkins agents on Windows VMs created only to have these tests run against them. These agents are Windows Services and they don't have a real windows session running where you can adjust the screen resolution.