### 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
#ifndef SCENE_TREE_DOCK_H
#define SCENE_TREE_DOCK_H
#include "editor/gui/scene_tree_editor.h"
#include "editor/script_create_dialog.h"
#include "scene/gui/box_container.h"
#include "scene/resources/animation.h"
class CheckBox;
class EditorData;
class EditorSelection;
class EditorQuickOpen;
class MenuButton;
class ReparentDialog;
class ShaderCreateDialog;
class TextureRect;
#include "modules/modules_enabled.gen.h" 
#ifdef MODULE_REGEX_ENABLED
class RenameDialog;
#endif 
class SceneTreeDock : public VBoxContainer {
	GDCLASS(SceneTreeDock, VBoxContainer);
	enum Tool {