In my case removing the buildconfiguration.xml
from "\AppData\Roaming\Unreal Engine\UnrealBuildTool\"
wasn’t working, I had to edit it and make it like this:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<VCProjectFileGenerator>
<Version>VisualStudio2022</Version>
</VCProjectFileGenerator>
<WindowsPlatform>
<Compiler>VisualStudio2022</Compiler>
</WindowsPlatform>
</Configuration>