The URI you're using is an SRV URI (mongodb+srv://...) which requires special DNS handling.
MONGODB_URI="mongodb://<username>:<password>@cluster0-shard-00-00.mz4zy3m.mongodb.net:27017,cluster0-shard-00-01.mz4zy3m.mongodb.net:27017,cluster0-shard-00-02.mz4zy3m.mongodb.net:27017/?ssl=true&replicaSet=atlas-xxxxx-shard-0&authSource=admin&retryWrites=true&w=majority"