UE5.3.2 and visual studio 2022 has this issue,The project could not be compiled. Would you like to open it in Visual Studio?

You will have to rollback to visual studio 17.8, the fix is made on 17.10 but they havent yet released it(except on preview i thk).