### Godot version

4.0.dev(0810ecaafdbee3ea747219e6ab3a8de5d2216a09)

### System information

any

### Issue description

https://user-images.githubusercontent.com/61938263/215898051-8506b45e-a9d4-4c3f-b1b3-28f202dea67b.mp4



### Steps to reproduce

Editt AnimationBlendTree

### Minimal reproduction project

N/A
if (gn->is_selected()) {
			arrange_entire_graph = false;
		}
	}
	HashMap<StringName, HashSet<StringName>> upper_neighbours;
	HashMap<StringName, Pair<int, int>> port_info;
	Vector2 origin(FLT_MAX, FLT_MAX);
	float gap_v = 100.0f;
	float gap_h = 100.0f;
	for (int i = get_child_count() - 1; i >= 0; i--) {
		GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
		if (!gn) {
			continue;
		}
		if (gn->is_selected() || arrange_entire_graph) {
			selected_nodes.insert(gn->get_name());
			HashSet<StringName> s;
			for (List<Connection>::Element *E = connections.front(); E; E = E->next()) {
				GraphNode *p_from = Object::cast_to<GraphNode>(node_names[E->get().from]);
				if (E->get().to == gn->get_name() && (p_from->is_selected() || arrange_entire_graph) && E->get().to != E->get().from) {
					if (!s.has(p_from->get_name())) {
						s.insert(p_from->get_name());
					}
					String s_connection = String(p_from->get_name()) + " " + String(E->get().to);
					StringName _connection(s_connection);
					Pair<int, int> ports(E->get().from_port, E->get().to_port);
					if (port_info.has(_connection)) {
						Pair<int, int> p_ports = port_info[_connection];
						if (p_ports.first < ports.first) {
							ports = p_ports;