Why node not related to another node, but iterable in findTreeChildrenNodes

Why node not related to another node, but iterable in findTreeChildrenNodes

node a, related to c node and d, but not to b

console log
end node Finish Start : a : c : e : g : Finish end node Finish Start : a : c : d : f : Finish end node Finish Start : a : b : e : g : Finish >>> ( b not related to a )

code to itarable ( function setLevel )
`

while (nodes.next()) {
    const node = nodes.value;
    const childs = node.findTreeChildrenNodes();
    if (childs.count) {
        parentNode = node;
        nodePath = nodePath + ' : ' + node.data.text;
        setLevel(childs, nodePath, parentNode)
    } else {
        console.log('end node', node.data.text, nodePath + ' : ' + node.data.text);
    }
}

`

Why after node a next node b, its due to nesting by node level ?
How to do it right, how I want it

example, see console log

Node | GoJS API only returns the immediate child nodes of a node.

What is your tree structure? Are there any hidden links?

sorry, you are right,
in my code i find bug )