$addFields holds the new fields temporarily within the context of the aggregation pipeline. It does not modify the original documents in the collection.
To persist the changes:
Use $out to write the result to a new collection, or
Use $merge to update or merge the result into an existing collection.