I have successfully solved the problem, the issue that I saw is in aggregation within $match I am using $in to check filter document however in solution its done using filter. And the count of the result is different.
I have also compared my query with the detailed answer query and the only difference I saw was around $match.
Can someone explain, what I missed by not using Regex.
Thanks in advance.