The listIndexes and the listCollections commands both pass the connection string for the targeted shard to storePossibleCursor():
https://github.com/mongodb/mongo/blob/7f1b07c07b2cdad14a60c2251839bf701b9b3818/src/mongo/s/commands/commands_public.cpp#L1449
https://github.com/mongodb/mongo/blob/7f1b07c07b2cdad14a60c2251839bf701b9b3818/src/mongo/s/commands/commands_public.cpp#L1407
If configured to use the new mongos cursor manager, storePossibleCursor() will try to parse the connection string as a HostAndPort string. (It does this because it needs the HostAndPort associated with the remote cursor in order to issue getMore and killCursors commands to the right place.) A replica set connection string does not parse as a valid HostAndPort, causing the command to fail. Instead, listIndexes and listCollections must pass the HostAndPort string of the replica set's primary node.