### 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
Array output;
	for (const PropertyInfo &pi : p_list) {
		if (pi.name.begins_with(array_element_prefix)) {
			String str = pi.name.trim_prefix(array_element_prefix);
			int to_char_index = 0;
			while (to_char_index < str.length()) {
				if (!is_digit(str[to_char_index])) {
					break;
				}
				to_char_index++;
			}
			if (to_char_index > 0) {
				int array_index = str.left(to_char_index).to_int();
				Error error = OK;
				if (array_index >= output.size()) {
					error = output.resize(array_index + 1);
				}
				if (error == OK) {
					String format_string = String(array_element_prefix) + "%d" + str.substr(to_char_index);
					Dictionary dict = output[array_index];
					dict[format_string] = object->get(pi.name);
					output[array_index] = dict;
				} else {
					WARN_PRINT(vformat("Array element %s has an index too high. Array allocation failed.", pi.name));
				}
			}