I have an issue with a document library where a file is being uploaded as an updated version, however, the old version is still visible (image below).
Please ensure the files has the same name. It only overwrites the file with the same name.
You can download a copy of the file from the SharePoint library, and then upload it to the library. See if it will overwrite the existing file with same name.