### 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
}
		if (E.hint != PROPERTY_HINT_RESOURCE_TYPE) {
			continue;
		}
		Variant value = p_node->get(E.name);
		if (value.get_type() != Variant::OBJECT) {
			continue;
		}
		Ref<Resource> res = value;
		if (res.is_null()) {
			continue;
		}
		if (!res->is_built_in() || res->get_path().get_slice("::", 0) != edited_scene->get_scene_file_path()) {
			
			continue;
		}
		const Pair<Ref<Resource>, Node *> pair(res, p_node);
		r_resources.push_back(pair);
	}
	for (int i = 0; i < p_node->get_child_count(); i++) {
		_gather_resources(p_node->get_child(i), r_resources);
	}
}
void SceneTreeDock::_edit_subresource(int p_idx, const PopupMenu *p_from_menu) {
	const ObjectID &id = p_from_menu->get_item_metadata(p_idx);
	Object *obj = ObjectDB::get_instance(id);
	ERR_FAIL_COND(!obj);
	_push_item(obj);
}
void SceneTreeDock::_bind_methods() {