### 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
for (int i = get_child_count() - 1; i >= 0; i--) {
				Ref<Texture2D> port_icon = get_theme_icon(SNAME("port"), SNAME("GraphNode"));
				GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
				if (!gn) {
					continue;
				}
				if (!connecting_out) {
					for (int j = 0; j < gn->get_connection_output_count(); j++) {
						Vector2 pos = gn->get_connection_output_position(j) + gn->get_position();
						Vector2i port_size = Vector2i(port_icon->get_width(), port_icon->get_height());
						port_size.height = MAX(port_size.height, gn->get_connection_output_height(j));
						int type = gn->get_connection_output_type(j);
						if ((type == connecting_type || valid_connection_types.has(ConnType(connecting_type, type))) && is_in_output_hotzone(gn, j, mpos, port_size)) {
							if (!is_node_hover_valid(gn->get_name(), j, connecting_from, connecting_index)) {
								continue;
							}
							connecting_target = true;
							connecting_to = pos;
							connecting_target_to = gn->get_name();
							connecting_target_index = j;
							return;
						}
					}
				} else {
					for (int j = 0; j < gn->get_connection_input_count(); j++) {
						Vector2 pos = gn->get_connection_input_position(j) + gn->get_position();
						Vector2i port_size = Vector2i(port_icon->get_width(), port_icon->get_height());
						port_size.height = MAX(port_size.height, gn->get_connection_input_height(j));
						int type = gn->get_connection_input_type(j);
						if ((type == connecting_type || valid_connection_types.has(ConnType(connecting_type, type))) && is_in_input_hotzone(gn, j, mpos, port_size)) {