Aggregation memory limit differences between Mongo 4.4.26 and 6.0.12

Hello,

I have an aggregation pipeline that works well with an atlas Mongo 4.4.26. And I plan to upgrade the database to version 6.0.12, and so I created a database in this version with the exact same data, and when I test the aggregation pipeline, it fails with an error “$push used too much memory and cannot spill to disk”. Is there a new limit in the v5 or v6 version that explains this new behavior?

The stage that fails looks like this, and has an allowDiskUse option set to true :

{
    $group: {
      _id: "$_id",
      updated_array_dates: {
        $push: "$_id.dates",
      },
      items: {
        $push: "$$ROOT",
      },
    },