Context
When the ReshardingRecipientService, marks itself as done. It will update it's local in memory representation of the state. But that will not lead to the rest of the recipient's in memory state to know that the recipient is finished. This is because it uses the CollectionMetadata to know the state of the operation.
The recipient's CollectionMetadata isn't updated until the coordinator sends a commands to the participants of the resharding operation to refresh.
So any calls to throwIfReshardingInProgress will not necessarily reflect the state of the ReshardingRecipientService but instead reflect the state of the recipient since the last refresh.
The Problem
The resharding_prohibited_commands.js relies on updates to the cache.collections collection (which has caused problems in the past, see SERVER-59694), it will allow all of the commands that are prohibited during resharding to be executed before the CollectionMetadata of the recipient has been updated.
Hence when the colldMod command was executed the throwIfReshardingInProgress function received reshardingFields that have not been updated to reflect the move to done by the ReshardingRecipientService.
Possible Solution
The test needs to be updated to not rely on the cache.collections as that doesn't have a strong relation to when the recipient is actually done.
We should either join the resharding operation and wait until it is done. Or take some other measure to determine whether or not the recipient is fully "done".