### 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
Node *new_parent = p_new_parent;
	ERR_FAIL_COND(!new_parent);
	if (p_nodes.size() == 0) {
		return; 
	}
	p_nodes.sort_custom<Node::Comparator>(); 
	bool no_change = true;
	for (int ni = 0; ni < p_nodes.size(); ni++) {
		if (p_nodes[ni] == p_new_parent) {
			return; 
		}
		if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_index()) {
			no_change = false;
		}
	}
	if (no_change) {
		return; 
	}
	Node *validate = new_parent;
	while (validate) {
		ERR_FAIL_COND_MSG(p_nodes.has(validate), "Selection changed at some point. Can't reparent.");
		validate = validate->get_parent();
	}
	
	p_nodes.sort_custom<Node::Comparator>();
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Reparent Node"), UndoRedo::MERGE_DISABLE, p_nodes[0]);
	HashMap<Node *, NodePath> path_renames;
	Vector<StringName> former_names;
	int inc = 0;