Visual Studio Code is a bit of a moving target when it comes to support. Part of the fun of open source.
Here’s a thread with some things that have worked for some users (not all):
Beyond that, consider Visual Studio Community. It’s still free for indy developers. It has a different look and feel, but unlike Code, it works right off the bat. There is also a paid code editor called JetBrains Rider. It’s definitely not free, but it has the best integration with Unity hands down.