The build process mostly consists of UnrealHeaderTool, UnrealBuildTool, and the Visual Studio Command Line Tools.
You are not likely going to be able to mix and match versions of UHT or UBT, and they are built every time you change something that could change how they operate. So, I don’t know what the source of your problem here might be, and I’m not even particularly sure what your question is, because I can’t tell what is broken, only that something is broken.
Do you have the unreal .uproject, and the visual studio .sln ?