When the upsert parameter is true for updateOne() or findOneAndUpdate:
If no document already exist :
If matches an existing document, MongoDB only applies the $set operation.
Therefore remove the $set operation fields from $setOnInsert object and mongoDb will add them from $set object in time of creating new document