### Godot version

4.1.dev (4d5f10fc3a)

### System information

MacOS 13.1 M1 Pro

### Issue description

When right clicking an element of an array/dictionary it will select it but it will never be unselected (not if you select another node nor by reselecting the node). This leads to a lot of element being marked as selected which makes it a little less readable. When doing a left click it won't select.

### Steps to reproduce

1. export an array 
2. add an element 
3. try left click it won't select
4. try right click it will select

### Minimal reproduction project

N/A
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
			Variant return_value;
			Callable::CallError call_error;
			move_function.callp(args_p, 5, return_value, call_error);
		} else {
			WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
		}
	} else if (mode == MODE_USE_COUNT_PROPERTY) {
		ERR_FAIL_COND(p_to_pos < -1 || p_to_pos > count);
		if (!swap_method.is_empty()) {
			ERR_FAIL_COND(!object->has_method(swap_method));
			
			if (p_element_index < 0) {
				
				undo_redo->add_do_property(object, count_property, count + 1);
				if (p_to_pos >= 0) {
					for (int i = count; i > p_to_pos; i--) {
						undo_redo->add_do_method(object, swap_method, i, i - 1);
					}
					for (int i = p_to_pos; i < count; i++) {
						undo_redo->add_undo_method(object, swap_method, i, i + 1);
					}
				}
				undo_redo->add_undo_property(object, count_property, count);
			} else if (p_to_pos < 0) {
				if (count > 0) {
					
					undo_redo->add_undo_property(object, count_property, count);
					List<PropertyInfo> object_property_list;
					object->get_property_list(&object_property_list);