Pyspark MongoAtlas connector invalid connection string

Hello, i’m having problems connecting to a mongodb atlas serverless instance, i downloaded the spark connector from the repo and updated a jar to my Azure Synapse Spark Pool instance, trying to connect with this code snippet:

query = (  spark.read.format("mongodb")
        .option('spark.mongodb.connection.uri', 'mongodb+srv://USER:PASSWORD@SERVERURL.mongodb.net/test?retryWrites=true&w=majority')
    	.option('spark.mongodb.database', 'test') \
    	.option('spark.mongodb.collection', 'test4') \
    	.load())

But it says

Invalid connection string: ‘mongodb+srv:/USER:PASSWORD@SERVERURL.mongodb.net/test?retryWrites=true&w=majority’
Caused by: com.mongodb.MongoConfigurationException: A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for ‘SERVERURL.mongodb.net’ contains the keys [loadbalanced, authsource]

What does this mean? it seems the url is wrong but in other snippets i have seen on the forums it seems to be well specified.

My versions are:
spark: 3.2.2+
python: 3.8+
mongodb-driver-3.9.1.jar
mongo-spark-connector-10.1.0-SNAPSHOT.jar
mongodb-driver-core-3.9.1.jar
bson-3.9.1.jar