SERVER-91465 made the write path on mongod convert StaleConfig for an updateMany that not is run as a retryable write to QueryPlanKilled to prevent mongos from retrying the write (here or here). As discussed in BF-34413, mongod shouldn't convert StaleConfig to QueryPlanKilled if the write is run in a transaction since it should be safe for the external client to retry after the transaction is (implicitly) aborted. Failing with QueryPlanKilled instead StaleConfig causes the transaction to not have a TransientTransactionError, therefore it's not considered retryable.