The GraphEdit node does not remove leftward connections

Godot Version

4.5

Question

I’m using the following code, and when I try to remove connections from the nodes, it doesn’t work.

My code:

@onready var main_graph_edit: GraphEdit = %MainGraphEdit

func _on_main_graph_edit_connection_request(from_node: StringName, from_port: int, to_node: StringName, to_port: int) -> void:
	main_graph_edit.connect_node(from_node, from_port, to_node, to_port)
	pass

func _on_main_graph_edit_disconnection_request(from_node: StringName, from_port: int, to_node: StringName, to_port: int) -> void:
	main_graph_edit.disconnect_node(from_node, from_port, to_node, to_port)
	pass

If I enable the Right Disconnects property, it allows me to disconnect the node from the right connection, but the other side doesn’t connect.

It can only be disconnected from the side with the red dot.
How can I make it possible to disconnect from the other side or from both sides?