Sharded cluster instance(Node) getting authentication error

Please check this link and refer to mongo documentation for Compact and connect strings for standalone,replica etc

Compact is a maintenance operation.Do not run any compact without understanding the implications

From your connect string remove replicaset and other nodes.
It will put you directly to the node you passed
Be clear about data bearing replica nodes and mongos