Dual monitor setup : screens sometimes get inverted

Hi,

I recently migrated my battered HP Workstation from OpenSUSE Tumbleweed + KDE to Rocky Linux 8.6 + GNOME. I did a bit of customizing with extensions to make GNOME more usable, and now I’m quite happy with it.

Here’s a screenshot of my setup:

As you can see, the panel and the dock are on the left monitor, as are desktop icons. I can open a window on the left screen and then drag it to the right screen.

Now here’s what happens. Sometimes when I open a new session, these screens get inverted. The panel and the dock are still on the left monitor, but desktop icons are all on the right side. When I open a new window, it opens on the right side, and then I have to sort of pull it over the right border of the right window to move it to the left monitor from the left.

Usually logging out and logging back in solves the problem, but it’s a bit of a nuisance. Anybody knows what causes this bug and how I can get rid of it?