### 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
HashSet<int> &ran = r_rem_anims->find(anim)->value;
						for (int i = 0; i < anim->get_track_count(); i++) {
							ran.insert(i);
						}
					}
					HashSet<int> &ran = r_rem_anims->find(anim)->value;
					if (anim.is_null()) {
						continue;
					}
					for (int i = 0; i < anim->get_track_count(); i++) {
						NodePath track_np = anim->track_get_path(i);
						Node *n = root->get_node_or_null(track_np);
						if (!n) {
							continue;
						}
						if (!ran.has(i)) {
							continue; 
						}
						HashMap<Node *, NodePath>::Iterator found_path = p_renames->find(n);
						EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
						if (found_path) {
							if (found_path->value.is_empty()) {
								
								int idx = 0;
								HashSet<int>::Iterator EI = ran.begin();
								ERR_FAIL_COND(!EI); 
								while (*EI != i) {
									idx++;
									++EI;
									ERR_FAIL_COND(!EI);