Database

db={"collection":[{"_id":ObjectId("6099619baa04f15c3fb67a83")}],"products":[{"_id":ObjectId("608d92fdc90b0ea83a8b52bb"),"map":[{"_id":ObjectId("609bc0c7c2a4e3164662238a"),"systemDelete_DT":null,"groupId":ObjectId("6099619baa04f15c3fb67a83")},{"_id":ObjectId("609bc0c7c2a4e3164662238a"),"systemDelete_DT":"2021-05-14T15:01:20+01:00","groupId":ObjectId("6099619baa04f15c3fb67a83")},{"_id":ObjectId("609bd0bbaffb7018a41c2f1e"),"systemDelete_DT":"2021-05-12T13:57:34+01:00","groupId":ObjectId("609964e44cc4275e520d3df0")},{"_id":ObjectId("609c019bad4cd31e7bc569bf"),"systemDelete_DT":"2021-05-12T17:26:43+01:00","shopifyId":"6670290944179","groupId":ObjectId("6099a006a8480e782ddc1d87")}]}]}

Query

db.collection.aggregate([{$lookup:{from:"products",let:{id:"$_id"},pipeline:[{$match:{"map.systemDelete_DT":null,$expr:{$in:["$$id","$map.groupId"]}}},{$project:{_id:1,map:{$arrayElemAt:[{$filter:{input:"$map",cond:{$and:[{$eq:["$$this.groupId","$$id"]},{$eq:["$$this.systemDelete_DT",null]}]}}},0]}}}],as:"p_map"}},{$replaceRoot:{newRoot:{$arrayElemAt:["$p_map.map",0]}}}])

Result