After the fix is implemented, it may take a few weeks to get to Atlas, hard to say now.
If you can’t wait, I’d suggest using a workaround, e.g., substituting $documents with something like:

db.test.aggregate([
  {$limit: 1},
  { $project: {docs: [<array of documents>]} }, 
  {$unwind: '$docs'},
  {$replaceRoot: { newRoot: '$docs'  }},
  { $merge: { ... }}
])