UnityEngine.UI needs to be imported as a package, but since you report it works fine, this is likely not the issue.
Beyond that, this may help you with intellisense and possibly other Visual Studio integration problems:
Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button
Also, this: No suggestions in Vscode