The two scenarios don't compare.
The reason that all burglars are charged when someone is killed during a burglary is because the burglars all voluntarily and with pre-meditation agreed to commit a burglary (a crime).
In a situation where a cop is charged with a murder, unless the other cops agreed with that cop to voluntarily and with pre-meditation commit a murder, then they shouldn't be charged. The only other circumstance where the other cops could also be charged is if they engaged in a cover-up after the murder happened.
Mere presence during a crime doesn't make someone guilty. Agreeing to commit the crime with another and being present is what makes one guilty.
The scenario you described with the cops would be like charging every witness and bystander with the murder just because they were present.