You can also configure zIndex prop from DefaultEdgeOptions, I think is the better approch here if you want to have all egdes on top of nodes.