I kept fixing and then kept having new problems with vscdoium in flatpak, either have to give it all permission or give up maybe. As I was using it there would be new problems every once in a while, and different extensions introduced new issues too lol
I gave up and just installed it through AUR.
Even though it's vscodium and not vscode you can run it with firejail --net=none /sbin/vscodium and it won't have access to the internet
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.