temporaryToNode always visible

I use this template for “temporaryToNode”:

goMake(go.Node,
            {
                layerName: "Tool"
            },
            goMake(go.Shape, "Rectangle",
                {
                    strokeWidth: 1,
                    stroke: "#4a90e2",
                    fill: null,
                },
            ),
        );

But even if I can’t find any links to finish when I start linking, my shape is visible.
I want to show the ornament when there is only one end point as in the default

You could set LinkingBaseTool | GoJS API to:

  function(node, port, tempNode, tempPort, toEnd) { tempNode.opacity = (node ? 1.0 : 0.0); }