### 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
for (int ni = 0; ni < p_nodes.size(); ni++) {
		
		Node *node = p_nodes[ni];
		fill_path_renames(node, new_parent, &path_renames);
		former_names.push_back(node->get_name());
		List<Node *> owned;
		node->get_owned_by(node->get_owner(), &owned);
		Array owners;
		for (Node *E : owned) {
			owners.push_back(E);
		}
		bool same_parent = new_parent == node->get_parent();
		if (same_parent && node->get_index() < p_position_in_parent + ni) {
			inc--; 
		}
		if (!same_parent) {
			undo_redo->add_do_method(node->get_parent(), "remove_child", node);
			undo_redo->add_do_method(new_parent, "add_child", node, true);
		}
		int new_position_in_parent = p_position_in_parent == -1 ? -1 : p_position_in_parent + inc;
		if (new_position_in_parent >= 0 || same_parent) {
			undo_redo->add_do_method(new_parent, "move_child", node, new_position_in_parent);
		}
		EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
		String old_name = former_names[ni];
		String new_name = new_parent->validate_child_name(node);
		
		if (old_name.casecmp_to(new_name) != 0) {
			
			HashMap<Node *, NodePath>::Iterator found_path = path_renames.find(node);