The Windows.Old
folder is auto-created by the Windows Update in order to allow for rollback if update fails or if the user wants to rollback later. It is a snapshot of the previously working version of Windows. AFAIK you cannot prevent this. If you could and the update failed then there would be no way to recover back to the previously working system.
I think the better option is to remove the directory after the update, and ideally after you've verified the update is good. From my understanding the folder should be automatically cleaned up approximately 10 days after the update as that should be enough time to confirm it is working correctly.
If you wanted to remove it earlier then ultimately you should run the Disk Cleanup tool as that has the option to remove the previous version. In theory you could just delete the directory I guess but I've never tried that and it is a system directory anyway so you might run into issues. The following article discusses how to programmatically call the Disk Cleanup tool from the CLI. You can run this command to clean up the previous Windows version.