Unreal opening command prompt instead of Visual Studio

It’s weird, because if you are using UE4 version 4.22 it does support VS2019 by default.
Try to go to
“YourProjecte/Config/DefaultEditorPerProjectUserSettings.ini”
and check if there’s anything along the line of

PreferredAccessor=VisualStudio2019

If not, add this to the file:

[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=VisualStudio2017

And save it.

In case it doesn’t work anymore the second time you open the project, try redoing the above configuration and set the file to read only.
Hope that helps!