The CMake (and C++) integration story for VS Code is not great... I ran into lots of issues when I tried some years ago, and now this happened too: https://news.ycombinator.com/item?id=43788125
I assume you can still get everything to kind of work, but be ready to commit to a fair bit of fiddling with extension settings.