Uninstall VS Code and download it directly from the official website.
It's likely that you installed VS Code using your software manager, which defaults to the Flatpak version. This version runs in a sandboxed environment, resulting in restricted permissions and limited functionality.