These two JS tests use killOp on the migration on a shard. This results in the config server receiving a ErrorCodes::Interrupted error on the moveChunk command it sent. ErrorCodes::Interrupted will not be retried. However, if there is a step down between receiving a response on the config server from the moveChunk command and removing the config.migrations document for that migration, the migration document is kept and the moveChunk command is retried.
Without config stepdown, killOp will behave as expected.