Companion MR for !6381 to fix #1060.
This is marked as draft, as the patch doesn't work for me for some reason.
Is perhaps GTK 4 using some portal system and the file dialog is coming from a different binary than the one I'm launching from the build directory?