TL;DR: Since Sonarr only keeps track of the source information for releases that it grabbed, tracked, imported, and renamed (or instances where you manually changed the release quality in Sonarr). It is best to have a release cleanly processed end-to-end in order to eliminate as many sources of interference as possible and better highlight possible break points.
Neither do I, but proper troubleshooting means you verify the simple things first. You should also verify that there is not an existing file in your completed downloads directory (or being downloaded currently). Also, if you can catch it, switch from debug to trace during the import/renaming portion, trace gives way more detail and is helpful for this type of issue. just remember to turn it back to info afterwards.
It may appear that way, but it isn’t really. You are getting clean debug logs following a single (or a few) release(s) through the following steps:
missing > search > grab > send to download client > monitor activity (downloading) > recognize completion > import > rename > recognize renamed file
Verifying that the episode doesn’t actually exist in the target directory, the completed downloads directory, and in the episode list in Sonarr is a good way to ensure that no other files are mistakenly used.
And, while I understand that you are more concerned with the file being misidentified after renaming we need to make sure that 1. We are renaming the correct release and 2. That Sonarr maintains visibility of the release through out the entire process so it knows that it is the same release. If sonarr loses visibility of the release during any part of this, it tends to cause problems, especially when the actual files or folders that are downloaded do not have the same identifying information in the directory/file name(s).
Better still would be doing this with an episode that has never existed on the system at all. we would probably still have to look at the logs, but if the episode history only had a grab and an import, it would be much easier to verify why the source identifier is changing.