Menu list keeps on growing every time I debug my Operator script
You can test whether menu_func is already part of _draw_funcs list and if so, do not prepend:
def register():
    bpy.utils.register_class(CUSTOM_OT_operator)
    
    if hasattr(bpy.types.VIEW3D_MT_uv_map.draw, '_draw_funcs'):
        if menu_func.__name__ not in (f.__name__ for f in bpy.types.VIEW3D_MT_uv_map.draw._draw_funcs):
            bpy.types.VIEW3D_MT_uv_map.prepend(menu_func)
    else:
        bpy.types.VIEW3D_MT_uv_map.prepend(menu_func)

def unregister():
    bpy.utils.unregister_class(CUSTOM_OT_operator)
    bpy.types.VIEW3D_MT_uv_map.remove(menu_func)


if __name__ == &quot;__main__&quot;:
    register()