Problem connecting to mongot after scale event

We are receiving a lot of connection errors after a scale event.

Unexpected error occurred: Command failed with error 6 (HostUnreachable): 'Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused' on server xxxxxxxx.mongodb.net:27017. The full response is {"ok": 0.0, "errmsg": "Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused", "code": 6, "codeName": "HostUnreachable", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1712829848, "i": 9}}, "signature": {"hash": {"$binary": {"base64": "CEFhxGmC+4Ztl/kYSgTLgwTh8LY=", "subType": "00"}}, "keyId": 7316846516700708866}}, "operationTime": {"$timestamp": {"t": 1712829848, "i": 9}}}

For what I can see in the error message above, the replica was made available before the mongot got started. If this is the case, can we do something to prevent this from happen?