[UE 5.1] VisualStudio 2022 Intellisense for engine files not working in UE5

This also worked for me. In my case I uninstalled Visual Studio 2022, then installed a newer version of 2022 which had some new features, but this caused Unreal Engine Editor to lose track of what Visual Studio I had, and in Editor Preferences it was selected simply as Visual Studio and not Visual Studio 2022. Also in Tools dropdown, I didn’t had Refresh Visual Studio 2022 Project, but Generate project files or something like that, after choosing that the two Refresh Visual Studio 2022 Project and Open Visual Studio 2022 appeared.

Thanks for your suggestion!