If it's not the setting in the project, I'm guessing the culprit is the script for managing resolutions. I'll keep at it and see if I can find a solution.
Reading further, it seems this is explicitly a problem with Godot 4.2. I will see if I can find a workaround for it.