I had the issue when I write C/C++ codes. I just disable the GitHub Copilot and GitHub Copilot Hub, which solve the problem. Check your VSCode extension tab.