I had this problem and I tried everything, but none of them worked. At last, I uninstalled the GitHub Copilot extensions and disabled the Copilot feature in VS Code, as it seemed this conflict was causing an issue in my workspace. Then, I deleted my project and cloned it again from GitHub, which fixed the issue.