It could be that Visual Studio is trolling you. I just tested it on my project, and it works quite fine. Does your build fail? Ignore the errors. And switch to Rider, you will forget VisualStudio ever existed.
If your build fails, please post error log as text here, so that we can help you.
Also, I found this tutorial, check it out: Unreal Engine: Enhanced Input System in C++ – A_Nightails