Blender 3.2? - How to hide object in new window

Blender - How to hide object only in this new window which i creat

Example:

create a button in blender VIEW_3D_UI and if i click the button in UI they create a new window if the new window appear on the screen then i select the object and press the key = any. thay hide the object only in this window which i creat. not in whole blender only in this newly window


if u do it .
so please make it addon

Code:

import bpy


render = bpy.context.scene.render
render.resolution_x = 640
render.resolution_y = 480
render.resolution_percentage = 100

prefs = bpy.context.preferences
prefs.view.render_display_type = "WINDOW"

bpy.ops.render.view_show("INVOKE_DEFAULT")

area = bpy.context.window_manager.windows[-1].screen.areas[0]
area.type = "VIEW_3D"

sorry for my bad english