UE5.1 VS2022 C++ Build Error With MSB3073

In my case it only happens when I run it as a development server in VSC 2022, because when I use development Editor it does not happen and the application runs well, but I need to run it as a server since I am using AmazonGameLift, is there a solution?