Incorrect GNOME Scale Setting after connection to Thunderbolt Dock

I have laptop PC that connects to a dock (Dell WD19TBS, but I don’t think it matters) via USB-C/Thunderbolt, and have a single external monitor that connects to the dock through HDMI. I have configured my Desktop to use the external monitor as the primary and extend my display with my laptop screen.

I encounter the problem when re-connecting the dock to the PC during a running User session. When I do this, something sets the Scale Setting (Settings > Devices > Displays > Scale) to 200%. I can fix this by setting the Scale back to 100%, but the real annoyance comes with all of my application windows having resized themselves to fit in the new resolution, so I have a bunch of short, wide windows that I then must resize to restore the session to its prior state.

This happens whether the desktop is showing the application windows or the lock screen. This happens if I connect the dock even before I resume my PC from a sleep state, and even if I disconnect the dock and reconnect all while the PC is sleeping. If I switch out of the desktop session to a different user session (e.g. the GDM login screen), that different session has the correct resolution/scale, but if I switch back to the first user session, it still has the incorrect scale.

My PC runs GNOME (Xorg, not Wayland) on LEAP 15.3, but I also observed the problem in LEAP 15.2. I would want to know how to configure this feature correctly, but I would also accept a solution that disabled scaling altogether.

This problem seems to have resulted from the GNOME desktop Scaling setting in “Auto” mode.

gsettings set org.gnome.desktop.interface scaling-factor 1

The value of 0 in this setting indicates automatic scaling, which I believe was causing the problem, and I have not encountered this bug since setting it to 1.