"Write conflict during plan execution and yielding is disabled"

Hi everyone, I have a Payload CMS application where I have an ‘order’ field for a “Campaign” collection where the order has to change accordingly if two orders overlap.
Let’s say I have campaign A at order 1 and campaign B at order 2 and want to swap them. I open campaign B and set order to 1, then a ‘afterOperation’ hook is triggered and I do an updateByID to campaign A so it changes to order 2.

That works on my local MongoDB but it does not work on MongoDB on Atlas (free tier). Both are version 7.

Here is the error I get when the update in the ‘afterOperation’ is called:

MongoServerError: Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction.

Any clues?