Collapse/expand subgraph and shift neighboring nodes/groups

Is there a way to make it so that expanding and collapsing a subgraph only shifts its neighbors, and doesn’t invalidate the entire layout for the diagram?

In this picture, I don’t want “Normal Object” to get moved as well.

Yes, this is quite possible for tree layouts. The idea is to override the collapseSubGraph and expandSubGraph commands so that it turns off layouts on all of the nodes that are not in the tree whose group is being collapsed or expanded.

Here is how you could override those two commands:

    myDiagram.commandHandler.collapseSubGraph = function(group) {
      if (group instanceof go.Group) setNonTreePartsLayout(group, false);
      go.CommandHandler.prototype.collapseSubGraph.call(this, group);
      if (group instanceof go.Group) setNonTreePartsLayout(group, true);
    };

    myDiagram.commandHandler.expandSubGraph = function(group) {
      if (group instanceof go.Group) setNonTreePartsLayout(group, false);
      go.CommandHandler.prototype.expandSubGraph.call(this, group);
      if (group instanceof go.Group) setNonTreePartsLayout(group, true);
    };

where the interesting work is done by:

    function setNonTreePartsLayout(node, allow) {
      var root = node.findTopLevelPart().findTreeRoot();
      var tree = root.findTreeParts();
      node.diagram.nodes.each(function(n) {
        var toplevel = n.findTopLevelPart();
        if (!tree.contains(toplevel)) n.isLayoutPositioned = allow;
      });
      // setting Part.isLayoutPositioned will automatically invalidate the layout,
      // which we don't want in this case, so:
      if (allow) node.diagram.layout.isValidLayout = true;
    }

NOTE: This all assumes that you have set TreeLayout.arrangement to go.TreeLayout.ArrangementFixedRoots.