### 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
void _create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap);
	void _create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap);
	void _list_all_subresources(PopupMenu *p_menu);
	void _gather_resources(Node *p_node, List<Pair<Ref<Resource>, Node *>> &r_resources);
	void _edit_subresource(int p_idx, const PopupMenu *p_from_menu);
	bool profile_allow_editing = true;
	bool profile_allow_script_editing = true;
	static void _update_configuration_warning();
	bool _update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const;
	bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const;
private:
	static SceneTreeDock *singleton;
public:
	static SceneTreeDock *get_singleton() { return singleton; }
protected:
	void _notification(int p_what);
	static void _bind_methods();
public:
	String get_filter();
	void set_filter(const String &p_filter);
	void save_branch_to_file(String p_directory);
	void _focus_node();
	void add_root_node(Node *p_node);
	void set_edited_scene(Node *p_scene);
	void instantiate(const String &p_file);
	void instantiate_scenes(const Vector<String> &p_files, Node *p_parent = nullptr);
	void set_selected(Node *p_node, bool p_emit_selected = false);
	void fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames);
	void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, HashSet<int>> *r_rem_anims = nullptr);
	SceneTreeEditor *get_tree_editor() { return scene_tree; }