Repository: puppeteer
Issue: [Bug]: Unable to take screenshot on multiples pages that are playing video in fullscreen
Labels: bug,screenshot,confirmed,P3

### Bug description

My purpose is to take  screenshots on multiple pages at the same time while those pages are playing video on fullscreen
but it`s not working for me, in my observation it taking screenshot by changing the tab one by one and it caused it cannot take screenshot while pages playing video on fullscreen

Steps to reproduce the problem:
1. run the `onePageIsFine` function in the script 
2. after the function finished check the `onePageIsFine.png` file in the current path you will see it works
3. run the `oneMorePageWillNotWork` function in the script
4. after the function finished check the images start with `oneMorePageWillNotWork*.png` in the current path
5. you will see it does not work, it did not take a screenshot while the page playing the video on fullscreen





```
const puppeteer = require('puppeteer')
let browser = null;


async function newPage(browser) {
    const page = await browser.newPage()
    let currentScreen = await page.evaluate(() => {
        return {
            width: window.screen.availWidth,
            height: window.screen.availHeight,
            deviceScaleFactor: 1
        };
    });

    await page.setViewport(currentScreen);
    await page.setUserAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36')
    return page;
}

async function takeScrrenshot(page, nameForSaveTheImg, times) {
    if(times > 0) {
        await page.screenshot({ path: nameForSaveTheImg })
        await page.waitForTimeout(500);
        await takeScrrenshot(page, nameForSaveTheImg, times - 1)
    }
}

async function playTheVideoInFullScrren(page) {
    await page.waitForSelector('.ytp-fullscreen-button')
    await page.click('.ytp-fullscreen-button')
}

async function onePageIsFine(page) {
    const onePageScrrenshotOnFullScrrenVideo = {
        page: await newPage(browser), 
        goto: 'https://www.youtube.com/watch?v=gvAF9mboxFM', 
        nameForSaveTheImg: 'onePageIsFine.png'
    }
    await oneMorePageWillNotWork([onePageScrrenshotOnFullScrrenVideo])
}

async function oneMorePageWillNotWork(pages) {
    pages = pages !== null && pages !== undefined ? pages : [
        {page: await newPage(browser), goto: 'https://www.youtube.com/watch?v=Nb5yppVh_4A', nameForSaveTheImg: 'oneMorePageWillNotWork1.png'},
        {page: await newPage(browser), goto: 'https://www.youtube.com/watch?v=kZC12U6EhTc', nameForSaveTheImg: 'oneMorePageWillNotWork2.png'},
        {page: await newPage(browser), goto: 'https://www.youtube.com/watch?v=0oBi8OmjLIg', nameForSaveTheImg: 'oneMorePageWillNotWork3.png'}
    ]

    await pages.forEach(async pageEl => {
        await pageEl.page.goto(pageEl.goto)
        await playTheVideoInFullScrren(pageEl.page)
        setTimeout(async () => {
            await takeScrrenshot(pageEl.page, pageEl.nameForSaveTheImg, 3)
            await pageEl.page.close()
        }, 3000);
    });
}


async function init() {
    browser = await puppeteer.launch(
        {
            executablePath: '/usr/bin/chromium',
            headless: false,
            userDataDir: './userData',
            args: ['--start-maximized', '--proxy-server=127.0.0.1:1080', "--window-size=1920,1080", "--window-position=1921,0"],
            ignoreDefaultArgs: ["--enable-automation"]
        })
}

async function closeTheBrowserAtTheRightTime() {
    //close the browser after 20 seconds.
    setTimeout(async () => {
        await browser.close()
    }, 20000);    
}

async function main() {
    await init()
    // await onePageIsFine()
    // await oneMorePageWillNotWork()
    await closeTheBrowserAtTheRightTime()    
}

main()
```

### Puppeteer version

^16.1.0

### Node.js version

v18.7.0

### npm version

8.17.0

### What operating system are you seeing the problem on?

Linux

### Relevant log output

_No response_