I had the same issue.
Each time it fails it would formatting my USB, and I left the USB's display name blank.
The last time I change the USB's display name as "X", it solved the problem.
After successfully installed, it changed the name to "ESD-USB".
This was the issue for me. Doesn't matter what you name the disk drive... Mine was showing up as "Local Disk" and then whatever drive letter it was assigned. So I thought it was literally named "Local Disk" but that means it actually doesn't have a name
and is just what the computer is calling it....
So I named it a few random letters then deleted the folders mentioned in this thread "$WINDOWS.~BT" and "$Windows.~WS" I think, disabled windows defender and tried again. Then it magically worked... like it should have in the first place.
You think for such a "sophisticated" tool that it could detect that the thumb drive doesn't have a name and just give it a name itself...
instead of wasting so much **** time then stalling, then giving an error code that's really no help whatsoever.
But no, we have tons of users here on this thread for the same problem, no help from Microsoft (like usual), all because of stupid reasons because it didn't have a name, or antivirus was turned on, or a folder needed deleted, etc, etc.
Pretty pathetic that such a simple problem requires so many resources from so many people and none of them were Microsoft.
Just to make it clear I don't hate Microsoft, but gotta admit this is downright sad...…..