Normally one overrides some methods of TreeLayout, such as:
TreeLayout | GoJS API, before any vertex is positioned
TreeLayout | GoJS API, after all vertexes have been positioned
If you do not want a subtree to be moved when the user drags a node, do not set DraggingTool | GoJS API to true.
Almost always if you explicitly perform a layout after the user has moved one or more nodes, those nodes will be moved to where the layout thinks they belong, thereby losing the movement that the user just did. Could you please be more specific about what you want to accomplish?