It looks like you might have redacted your data or your query prior before posting your question. The query is inconsistent with your input documents and cannot possibly produce the current output you shared.
You $lookup with localField: 'items.activity_type_id' and no input documents have a field named items and items is neither a projected field or the as: field of a $lookup.
Your ObjectId(xxx) also seems to be redacted, in Constants collection you have id:001 but you seem to use them as ObjectId(xxx). Not that mongosh can use the expression ObjectId(002) but you do not get the same value for all invocation. Taking your 2 Activity documents as published, I get:
{
propert1: '',
propert2: '',
config: {
agenda_item_category_ids: [
ObjectId("00000001a582a3f70ad77b7e"),
ObjectId("00000002a582a3f70ad77b7f")
]
},
activity_type_id: ObjectId("0000007ba582a3f70ad77b80")
}
{
propert1: '',
propert2: '',
activity_type_id: ObjectId("000001c8a582a3f70ad77b81"),
config: {
agenda_item_category_ids: [ ObjectId("00000002a582a3f70ad77b82") ]
}
}
You are also missing some field separator.
Please verify your query and documents and post corrections that we can use.