For us it was because we'd added a private link to another unrelated CosmosDb - as soon as we added any private links, it broke the ability to connect to a public CosmosDb. To workaround this we switched on the firewall on the CosmosDb and used firewall rules to allow the IP mentioned (with a longer term plan of switching to privatelink).