There is no known issues with that configuration specific to Cosmos DB.
I would recommend using the latest 4x tagged npm package. At this time, that is 4.17.2. You can see the 4x tag on npm here: https://www.npmjs.com/package/mongodb?activeTab=versions