### Godot version

4.1.stable

### System information

Windows 11 (x64), Intel(R) Core(TM) i5-9400 CPU, Vulkan,  NVIDIA GeForce GTX 1660 Ti driver version 528.24

### Issue description

Every time you right click the Filter Nodes field, it duplicates the 'Filters' section in the dropdown.

https://github.com/godotengine/godot/assets/104696964/b8d867c9-ba31-47c5-91c8-23cfa02f1c89



### Steps to reproduce

Rightclick the Filter Nodes field.

### Minimal reproduction project

N/A
if (!profile_allow_script_editing) {
		button_create_script->hide();
		button_detach_script->hide();
	} else if (editor_selection->get_selection().size() == 0) {
		button_create_script->hide();
		button_detach_script->hide();
	} else if (editor_selection->get_selection().size() == 1) {
		Node *n = editor_selection->get_selected_node_list()[0];
		if (n->get_script().is_null()) {
			button_create_script->show();
			button_detach_script->hide();
		} else {
			button_create_script->hide();
			button_detach_script->show();
		}
	} else {
		button_create_script->hide();
		Array selection = editor_selection->get_selected_nodes();
		for (int i = 0; i < selection.size(); i++) {
			Node *n = Object::cast_to<Node>(selection[i]);
			if (!n->get_script().is_null()) {
				button_detach_script->show();
				return;
			}
		}
		button_detach_script->hide();
	}
}
void SceneTreeDock::_selection_changed() {