Hi Michael,
Thank you for querying in this forum.
From your description, it seems that you are trying uploading a file to replace an existing file in SharePoint Online, however, when you selected overwrite, you found this file has been uploaded for a second time.
May I know if my understanding is right? If so, we have also tested it on our side, we went to SharePoint Document library and uploaded a file, then we uploaded again the same file, we encountered the error message, as shown below:
And per our test, before showing this message, the file will be uploaded for the first time, and after clicking Replace, it will be uploaded for the second time. This may because SharePoint identified a file with the same file name at the end of uploading the file, so after clicking Replace, it re-run the upload process.
Given this situation, we do understand the inconvenience caused and apologize for it.
We also understand that you want to avoid uploading twice, , since we can reproduce the same situation as yours, this issue may need to be checked from background, we’d suggest you contact the administrators in your organizations and open a support ticket in the Office 365 admin center via the steps in the article for further help and provide your suggestion and feedback. The support team there has the correct escalation channel for this case. This is also the most efficient way in handling this kind of issue.
For a workaround, if you just want to overwrite the original file, to avoid uploading twice, we’d suggest you go to SharePoint Document library to delete the original file and upload the file.
Your understanding and patience will be highly appreciated! I hope that you are keeping safe and well!
Best Regards,
Sukie