Welcome to Microsoft Q&A Platform.
Check if you could find the registry below: try to delete.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Cleanup
For this error, official website provided we need to rebuild the Windows image. Because the Windows Software Licensing Rearm program has run more than three times in a single Windows image. That's a limitation. Please check the information in the link below:
As the above link provided, you could check the Setuperr.log file is located in the \Windows\System32\Sysprep\Panther folder. Some failed information will be included.