On windows the 1_Generate.py when executed with the config option fails to delete Generated/Configuration directory, which causes the script to fail.
Sometimes running the script multiple times can lead to a deleted directory, which can be used as a workaround.
The problem may be caused by TortoiseGit-status-cache which sometimes blocks files. I think I read elsewhere that the shutil.rmtree() sometimes has this problem.
Edit: The cause of the problem are probably read-only files that are created by git.