The drop database command resends a drop collection command if finds that the previous execution was interrupted with a stepdown. This is done to ensure the collections are dropped even if a stepdown happened right after saving the coordinator document with the last collection to be dropped. However, if a stepdown happens after removing the database metadata and another shard manages to create a new database, then, the newly elected primary will end up dropping a collection that belongs to another database, which is not correct.
A repro of this scenario can be found attached. In order to prevent this, we could clean the collection field of the coordinator document after all the collections are successfully dropped.