[SOLVED] I solved the same problem by forcibly uninstalling “UnrealDatasmithMaxExporter_4_27” using microsoft’s own software: “MicrosoftProgram_Install_and_Uninstall.meta”.
1 - I noticed that there was already an “UnrealDatasmithMaxExporter_4_27” installed on my PC.
2- I tried to uninstall and the same error you reported above appeared.
3- I used the free software: “MicrosoftProgram_Install_and_Uninstall.meta” to force uninstall.
4 - Success! After having done the uninstall, I was able to install Datasmith Exporter in Max 2021.