There’s a great article about how cluster members are located using DNS SRV records here: MongoDB 3.6: Here to SRV you with easier replica set connections | MongoDB
I thought it was a fun read, and will give you some hints as to the queries to run to diagnose your issue.