Problem: The engine compiles every time we do changes to our project

I just went through the steps you offered here and yes, Project Only -> Build … invokes UBT only once and only for the game modules. Build -> Build Solution (or F7 by the default binding) invokes UBT for each project in the solution with their individual “Build” command lines.
Thank you for clearing up this issue!

I had a same problem and I can solved that by unloading engine project on visual studio(right click on project folder and click on unload project) so only game project will be compiled and also compile button on unreal engine will work.

One thing you can do is right click ck on your project and you can see project only.Click on it and you can click build project only.It will help you

Perhaps this is just because of my project setup, however, the UE5 project is only included so that the UE5 Engine source is in the Solution. Unloading it does nothing. The Unreal Build Tool is still being used, so most of the VS features will not work - it is built via CMD.