Parent and child names starts with Cube. The node returns only the parent name. Both objects are deleted because when the parent is deleted, child is too.
Thank you for reporting @knowledgenude
This behavior of the logic node is because the code searches for the children's' children too. Not just one layer of child objects but every layer.
I guess this will cause confusion since even if an object has a child with a particular name, another object somewhere at a lower level will be returned.

In the example above, the user might expect to get the object C at Layer 1 when searched using starts with C but instead gets C1 at Layer 2.
One way to solve this is to remove the search for children's children and instead use the search node again on the child object.
Edit: This also improves searching, since the search nodes can be used in different combinations. I can make changes if there are no objections.
For me i don't see any need to search for the child of the child. If this is required, just use a node for search the child of the parent and another to search for the child of the child.
Most helpful comment
Thank you for reporting @knowledgenude
This behavior of the logic node is because the code searches for the children's' children too. Not just one layer of child objects but every layer.
I guess this will cause confusion since even if an object has a child with a particular name, another object somewhere at a lower level will be returned.
In the example above, the user might expect to get the object
CatLayer 1when searched usingstarts with Cbut instead getsC1atLayer 2.One way to solve this is to remove the search for children's children and instead use the search node again on the child object.
Edit: This also improves searching, since the search nodes can be used in different combinations. I can make changes if there are no objections.