Other mistake: When Al Pacino is supposedly dead, on the left side of his neck ( to our right ) his pulse can still be seen slightly.
Other mistake: When Al Pacino falls into the water off the floating logs, the platform on which he climbs out of the water onto is already wet and even has footprints leading to the metal walkway behind him (which at the end of the scene he leaves on).
Answer: Plot device to make Ellie look like a super sleuth remembering Dormer even carries a backup. When Hap and Dugger were comparing guns Hap says he and Dormer both carry S&W .45s. This makes the 9mm casing Ellie found a complete mystery to everyone else. So why the switch? Dormer's primary might be empty, but this is the first time Dormer shoots and all the characters act like there are only two shots fired in the fog, so for it to be empty he would have to be terribly sloppy. If he's so bad he forgot to load his gun it's equally likely he left the safety on. Maybe Dormer is just so used to being a dirty cop he instinctively uses the backup whenever possible to create an alibi. Ultimately, there is no explanation for this in the film, and if blink you don't even see the switch and are very confused when the 9mm casing shows up in the first place, if Nightmute carries.40, and Dormer .45, then 9mm has no place at all.
In the Netflix version with subtitles, when Dormer fires his primary weapon, the subtitle says "gun clicks." Dormer briefly looks at his gun and then pulls his secondary weapon. Nolan may have intended this to be ambiguous so the viewer doesn't know whether it was an accident or intentional (Nolan would never leave a "mistake" in the final edit - in fact, in interviews, he said he watched the movie at least a hundred times while editing), but the subtitles seem to put this debate to rest.