Copy scene node tree to other scenes
I have managed to do it via the
bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1) hack.

import bpy

class TEST_OT_poll():
    @classmethod
    def poll(cls, context):
        if context.space_data.type == 'NODE_EDITOR' and context.space_data.tree_type == 'CompositorNodeTree':
            return True
        else:
            return False

class COPY_SCENE_NODE_TREE_OT_copy_to_others(bpy.types.Operator, TEST_OT_poll):
    bl_idname = &quot;node.csnt_test_temp&quot;
    bl_label = &quot;TEMPT TEST&quot;
    bl_description = &quot;&quot;
    bl_options = {'REGISTER', 'UNDO'}
    

    def execute(self, context):
        
        initial_scene = bpy.context.scene
        
        scenes = bpy.data.scenes.values()
        scenes.remove(initial_scene)
        
        bpy.ops.node.select_all(action='SELECT')
        bpy.ops.node.clipboard_copy()
        
        for scene in scenes:
            print(scene)
            bpy.context.window.scene = scene
            bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1)
            bpy.context.scene.node_tree.nodes.clear()
            bpy.ops.node.clipboard_paste()
            bpy.ops.node.select_all(action='DESELECT')
        
        bpy.context.window.scene = initial_scene
        bpy.ops.wm.redraw_timer(type='DRAW_WIN', iterations=1)
        bpy.ops.node.select_all(action='DESELECT')
        
        return {'FINISHED'}
  
    
    
class COPY_SCENE_NODE_TREE_PT_panel(bpy.types.Panel):
    bl_idname = &quot;COPY_SCENE_NODE_PT_panel&quot;
    bl_label = &quot;Copy scene node tree&quot;
    bl_space_type = 'NODE_EDITOR'
    bl_region_type = &quot;UI&quot;
    bl_category = &quot;Tool&quot;

    @classmethod
    def poll(cls, context):
        if context.space_data.tree_type == 'CompositorNodeTree':
            return True
        else:
            return False

    def draw(self, context):
        
        layout = self.layout
        column = layout.column()
        column.operator(&quot;node.csnt_test_temp&quot;, text = &quot;Copy And Paste&quot;)
    

classes = (
    COPY_SCENE_NODE_TREE_PT_panel,
    COPY_SCENE_NODE_TREE_OT_copy_to_others,
)

def register():
    for c in classes:
        bpy.utils.register_class(c)

def unregister():
    for c in classes:
        bpy.utils.unregister_class(c)
        
        
if __name__ == &quot;__main__&quot;:
    register()