### 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
}
			ERR_FAIL_MSG("Script does not extend Node-derived type.");
		}
		new_node->set_name(Node::adjust_name_casing(p_file.get_file().get_basename()));
		new_node->set_script(scr);
		undo_redo->create_action(TTR("Instantiate Script"));
		undo_redo->add_do_method(n, "add_child", new_node, true);
		undo_redo->add_do_method(new_node, "set_owner", edited_scene);
		undo_redo->add_do_method(editor_selection, "clear");
		undo_redo->add_do_method(editor_selection, "add_node", new_node);
		undo_redo->add_do_reference(new_node);
		undo_redo->add_undo_method(n, "remove_child", new_node);
		EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
		undo_redo->add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(n), new_node->get_class(), new_node->get_name());
		undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(n)).path_join(new_node->get_name())));
		undo_redo->commit_action();
	} else {
		undo_redo->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, n);
		undo_redo->add_do_method(InspectorDock::get_singleton(), "store_script_properties", n);
		undo_redo->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", n);
		undo_redo->add_do_method(n, "set_script", scr);
		undo_redo->add_undo_method(n, "set_script", n->get_script());
		undo_redo->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", n);
		undo_redo->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", n);
		undo_redo->add_do_method(this, "_update_script_button");
		undo_redo->add_undo_method(this, "_update_script_button");
		undo_redo->commit_action();
	}
}
void SceneTreeDock::_nodes_dragged(Array p_nodes, NodePath p_to, int p_type) {