Prevent Default behavior of linking between 2 nodes

I’m having a condition where 2 nodes cannot be connected more than once, due to which we show red border color while making a link, but in this case even if the mouse reaches the node near it identifies the detectable port that can be connected, but this behavior should only occur when i drag the link over the toNode not before that, here is an example of this behavior
I want to prevent the default behavior of getting attached to a nearby connectable port and let the user choose the port itself.

Is greatly reducing the value of LinkingTool.portGravity sufficient for your needs?

How are you showing that red color while the user is drawing a new link?

Thanks for your help