In BF-32761 we saw invalid_shard_identity_doc.js failing due to a write-command that was issued to the config shard.
This happened, because the primary of that shard has just stepped down due to the background hook that is ran in the sharding_csrs_continuous_config_stepdown suite.