The assertion for the dropIndexes test here assumes that the recipient shard always finishes cloning the collection options and the missing indexes from the donor before dropIndexes aborts the migration. However, this is not always true. The listIndexes run by the assertion could sometimes fail with NamespaceNotFound because the collection does not exist on the recipient.
Similarly, the assertion for the collMod test here assumes that the recipient shard always finishes cloning the collection options before collMod is run and aborts the migration. This is again not always true. The command could finish running before the recipient starts cloning the collection.
Therefore, these two assertions are only expected to pass when the index commands are run after the steady state is reached.