May 23 2020
I have a potential idea why this bug occurs. I was editing the Wikipedia page and I had already typed in the code to include the file name that I was going to upload. I speculate that when I entered a preview mode for the Wikipedia page, the Wikipedia might have somehow allocated the file name (of yet non-existent file). Then, when I actually uploaded the file on Commons, perhaps there was a conflict with the file name between the two environments. This is just a guess. I hope it might help.
The same issue for another of my photos/files I uploaded: