This worked for me (W11): At the bottom left corner of Visual Studio Code, it showed that the editor was in restricted mode. To fix the issue, simply switch to "Trust Mode." Once you do that, the problem will be resolved.