WriteConflict Error while saving the data using bulkwrite inside transaction

I’m trying to bulwrite which has 9000 objects inside transaction. But I’m getting writeConflicts error as shown below:
MongoBulkWriteError: WiredTigerIndexStandard::_insert: index: tenantId_-1_leadActivityId_-1; uri: table:index-12-7700191342924377062 :: caused by :: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.
The code is given below :

 await model.bulkWrite(
        activities?.map((doc) => ({
            updateOne: {
                filter: { $and: [{ Id: doc.Id }, { adAccountURN: doc.adAccountURN }, { SomeId: doc.SomeId}, { pivotValue: doc.pivotValue }] },
                update: { $set: doc },
                upsert: true,
            },
        })),
        { ordered: true, session: session },
    )
````
Anyone have some idea on this?