How to draw a Panel only in the Shader editor node editor (object type based)?
Poll the ui_type
With the advent of more than one UI in a particular area type, when this is the case look at the Area.ui_type
Unaware of, but there may be a bl_context (or similar) class property to do this.  As with 99% of blender the UI code is there to peruse.
Look up the docs for options, put a print in draw method, or find quickly via blender's python console
&gt;&gt;&gt; C.area.ui_type = 'XXXX'
Traceback (most recent call last):
  File &quot;&lt;blender_console&gt;&quot;, line 1, in &lt;module&gt;
TypeError: bpy_struct: item.attr = val: enum &quot;XXXX&quot; 
not found in (, 'VIEW_3D', 'VIEW', 'UV', 
'CompositorNodeTree', 
'TextureNodeTree', 
'ShaderNodeTree', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'DOPESHEET', 'TIMELINE', 'FCURVES', 'DRIVERS', 'NLA_EDITOR', 'TEXT_EDITOR', 'CONSOLE', 'INFO', 'OUTLINER', 'PROPERTIES', 'FILE_BROWSER', 'PREFERENCES')

Notice there are three obvious candidates for nodetrees.
Test script.  Polls if the context area  ui_type is 'ShaderNodeTree'
import bpy

class ADDON_PT_Panel(bpy.types.Panel):
    
    bl_label = &quot;Test&quot;
    bl_idname = &quot;ADDON_PT_Panel&quot;
    bl_space_type = 'NODE_EDITOR'
    bl_region_type = 'UI'
    bl_category = &quot;Test&quot;
    #bl_context = &quot;scene&quot;
    
    
    @classmethod
    def poll(self, context):
        return context.area.ui_type == &quot;ShaderNodeTree&quot;    

    def draw(self,context):
        layout = self.layout
        #print(context.space_data.ui_type)
        layout.label(text=&quot;Hello World&quot;)
        
bpy.utils.register_class(ADDON_PT_Panel)