Ok, that proves that there are some (broken) leftovers in your VS Code setup.
Unfortunaltey, I don’t know much about esp-idf projects. I’m more the Arduino guy ![]()
But maybe you can share the project or a minimal example to reproduce (via github?).
It is difficult to “debug” just by having the error messages without the context (code / project).