Preventing Node positions from changing when expanding a tree

Thank you for starting to describe your requirements more carefully, so that I can understand the distinctions you are making.

It sounds like you want to implement a “SelectionMoved” DiagramEvent listener that sets Part.isLayoutPositioned to true.
https://gojs.net/latest/intro/events.html#SelectionMoved

$(go.Diagram, . . .,
  { . . .,
    "SelectionMoved" function(e) {
      e.subject.each(function(p) {
        if (p instanceof go.Node) p.isLayoutPositioned = false;
      });
    }
  })

If you want that information saved in your model, add a TwoWay Binding to your node template(s) for that property.