read_pref_cmd.js fails intermittently because it uses a direct connection to the shard. It is sharding a collection, but since SERVER-80135, shardCollection information refresh has been converted from sync async, and hence if a direct connection ends up using stale information the command fails with sharding status of collection read_pref_cmd.testCollSharded is not currently known and needs to be recovered.
The fix is to not use the direct connection, or do something before to force a refresh.