Selecting a node needs some more customization

this is what I want image

but this is what I got image

this is what I did

 {
        selectionAdornmentTemplate:
          $(go.Adornment, "Auto",
            $(go.Shape, new go.Binding("figure", "shape"),
              new go.Binding("stroke", "lineColor"),
              { fill: null, strokeWidth: 2, strokeDashArray: [5, 3] }),
            $(go.Placeholder))
      },

I just wanted to make dashes on border of node only… but it increases the height and width of the node for selection

That’s because putting a border around an element treats it as a rectangular area that should not intersect with the border figure if it can be helped. Set Shape.spot1 and Shape.spot2.

{ spot1: go.Spot.TopLeft, spot2: go.Spot.BottomRight }

thank you so much @walter,it works fine now and also I need some more help about that true,false,in comments on the out of the node

image