Answer for Why do I see linked items in traceability tab but not in the traceability matrix report?

In order to see traceability matrix across projects, you need to generate the traceability matrix while in solution that contains all projects you wish to include
So in that case, you need solution Z to contain project A and B