I was able to prevent this by turning off the semanticHighlighting flag in settings.
"editor.semanticHighlighting.enabled": false
I am using v1.94.1. Had other problems too like incorrect code and import suggestions, delayed file updates. Downgraded to v1.92