### 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
String action_name;
	if (p_element_index < 0) {
		action_name = vformat(TTR("Add element to property array with prefix %s."), array_element_prefix);
	} else if (p_to_pos < 0) {
		action_name = vformat(TTR("Remove element %d from property array with prefix %s."), p_element_index, array_element_prefix);
	} else {
		action_name = vformat(TTR("Move element %d to position %d in property array with prefix %s."), p_element_index, p_to_pos, array_element_prefix);
	}
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(action_name);
	if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
		
		Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
		if (move_function.is_valid()) {
			Variant args[] = { undo_redo, object, array_element_prefix, p_element_index, p_to_pos };