Match and return node only if node exist

Thank you for your response. But the query you provided doesn't work. Below I have have attached a subgraph and the names.
image

For this connection, the below query works

But if I have a query like the below it gives me nothing

If I try the query you suggested I only get the output for label2

So if I then try to call label1 with OPTIONAL MATCH it's start to fetch the other subgraphs as well

I hope this helps understand my issue.