I had this problem and the fix for me is to reload the entire window in vscode.
Step 1 Ctrl + shift + p
Step 2 Search for reload window and click on it.