I suspect you are talking about the “Selection” Adornment that is shown for a selected Part. In the case of Links, this defaults to a dodgerblue line Shape. Because Adornments are in the “Adornment” Layer that is in front of all normal Nodes and Links, the Adornment will be in front of every GraphObject in the visual tree of the Link.
You have several choices.
First, is it important that a selected Link have a “Selection” Adornment? If not, set Link.selectionAdorned to false.
Second, if you don’t need an Adornment but do want it to show as a differently colored path, you can add a binding to the Link’s path Shape. Perhaps something like:
new go.Link(. . .)
.add(
new go.Shape({ strokeWidth: 2 })
.bindObject("stroke", "isSelected", sel => sel ? "dodgerblue" : "black"),
. . . // your label(s) and arrowhead(s)
)
Third, you could do the same thing as above, but on a separate Shape that is GraphObject.isPanelMain along with your Link path Shape, but has a much wider strokeWidth so that it shows up behind what the user sees as the path:
new go.Link(. . .)
.add(
new go.Shape({ isPanelMain: true, strokeWidth: 6, stroke: null })
.bindObject("stroke", "isSelected", sel => sel ? "dodgerblue" : null),
new go.Shape({ isPanelMain: true, strokeWidth: 2 }),
. . . // your label(s) and arrowhead(s)
)
Fourth, if you do need a “Selection” Adornment, you could define it so that was in a separate isTemporary Layer that was behind your Links.