Screen capture popup keeps swapping the applications windows

I’m developing a site that uses the Screen Capture API to capture a game’s windows and check the screenshots taken to notify user of some scenarios.

My problem here is when we open the Screen Capture popup to choose which application window I want to capture, all the applications on the popup keep changing it’s location inside it, so it gets very difficult to select the correct application’s window. I presume that the popup keeps checking if there are new open windows to add on it, and since all the game windows have the same name, the ordenation just don’t take it in mind. Anyway, is there any way to avoid this behavior?

The Screen Capture API is an inbuilt API, so I dont control the popup, nor how the window selection is made. This is how the selection is started:

    const displayMediaOptions = {
        video: {
            displaySurface: "window",
            cursor: "hidden"
        },
        audio: false,
    };

videoElem!.srcObject =
                    await navigator.mediaDevices.getDisplayMedia(displayMediaOptions);

I’ve tested on google chrome, edge and firefox last versions on windows 10. All have this same behavior.

Here a video for better understanding:
https://youtu.be/6QKnYghi-Cc

Thanks