### 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 (!r_layer.size()) {
		return Vector<StringName>();
	}
	StringName p = r_layer[Math::random(0, r_layer.size() - 1)];
	Vector<StringName> left;
	Vector<StringName> right;
	for (int i = 0; i < r_layer.size(); i++) {
		if (p != r_layer[i]) {
			StringName q = r_layer[i];
			int cross_pq = r_crossings[p][q];
			int cross_qp = r_crossings[q][p];
			if (cross_pq > cross_qp) {
				left.push_back(q);
			} else {
				right.push_back(q);
			}
		}
	}
	left.push_back(p);
	left.append_array(right);
	return left;
}
void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, HashSet<StringName>> &r_upper_neighbours, const HashSet<StringName> &r_selected_nodes) {
	for (const StringName &E : r_selected_nodes) {
		r_root[E] = E;
		r_align[E] = E;
	}
	if (r_layers.size() == 1) {