Hi, I have absolutely the same issue.
I was sitting on 2.24.0 and my MongoDB testcontainers worked like a charm with a following setup:
_mongoDbContainer = new MongoDbBuilder().WithReplicaSet().Build();
and

var mongoClient = new MongoClient(_mongoDbContainer.GetConnectionString());
services.AddSingleton<IMongoClient>(mongoClient);
var mongoDbSettings = _configuration.GetSection("MongoSinkSettings");
services.AddSingleton(provider =>
{
    var client = provider.GetRequiredService<IMongoClient>();
    var database = client.GetDatabase(_mongoDatabaseName);

    return database;
});

But since update to 3.1 of driver and bson libraries I start getting 30 seconds timeouts.
The testcontainer itself still works like a charm and I even connected to it’s instance via Studio 3T, but from the code it doesn’t work. I tried lots of stuff like manually setting tls settings and api version but nothing really worked.

Assuming the fact that after rollback everything works again I believe the issue is within some breaking changes in driver internals. Could you please take a look at it? It feels like the topic starter had the same issue.