You are going to want to run something like flatpak list to see what flatpak calls the app. It will be a com.something.codium or similar.
Then you can open the file by running it as sudo flatpak run flat.pak.app and then find your file. You should be able to edit and save.
It is a bit involved, but usually people will do this via cli text editor and just say sudo editor file.txt. We need the extra steps here due to gui app.
Running as root is a forceful workaround, not the solution to my problem. I want to open this lock, not break it.
I don't want to run as root because...
The "Retry as Sudo" dialog is supposed to appear, and when I click on the button, I am supposed to get a password prompt. That's what happens in the Apt version; that's what happens in the Snap version; and in the NixPKG version, they had the same problem, but they fixed it.
Hmmm I am not sure. Might be worth asking in one of the mainline linux communities. At a minimum they might be able to point to a more active community instance for asking questions. As it is, this is not really a VSC issue per say.