I had this problem, the reason was that vs code was installed via FLATPACK(No, never do that), that is, paths and access rights would be limited. I reinstalled the solution via the terminal