Update 2023-11-14 (Kevin): The PR from the bisection causes the game view scale to snap to whatever the EditorGUIUtility.pixelsPerPoint is whenever that updates. The root bug is that certain EditorWindow / GUIView / HostView code paths will try to grab the platform's monitor scaling and incorrectly grab the scaling from the wrong monitor. This is an extremely difficult to reproduce bug that requires the editor to be in a very specific state where performing some action (that does something with windows... e.g. opening a context menu which is an EditorWindow).
Steps to reproduce:
1. Open the attached project "Test Project.zip"
2. Have 2 displays, primary set as 4k with 125% display scale and secondary at 1080p with 100% display Scale
3. Move the Editor to Display #2 (set as 1080p)
4. Enter Play Mode
5. Observe the Game View Scale Slider
Expected results: display scale is read from the display it's presented on, not the primary display, and 1x scale is applied to Game View
Actual Results: The editor is reading the displace scale from the Primary Monitor when the Editor is on a secondary Monitor thus adjusting the Game View Scale to 1.3
Reproducible in: 2021.3.28f1, 2022.3.0f1, 2022.3.5f1, 2023.1.5f1, 2023.2.0a23, 2023.3.0a1
Not reproducible in: 2022.2.21f1
Environment tested on: Windows 10
Notes:
-A workaround is to turn off Low-Resolution Aspect Ratios, however, that option is only available if the Display Scale of a Monitor is set to 125%