Blender Python: Declare Property Group (on the stack?)
One simple way to accomplish this is to set up a PointerProperty on the scene to store these values:

def register():
    bpy.utils.register_class(MyClass)
    bpy.types.Scene.temp_props = PointerProperty(type=MyClass)


Now you can reference the properties in your draw_buttons call with bpy.context.scene.temp_props:

def draw_panel():

    if active_object:
        draw_buttons(active_object.MyProperties, disabled=False)
    else:
        temp_props = bpy.context.scene.temp_props
        draw_buttons(temp_props, disabled=True)


You can also store the PointerProperty to many other ID structs from bpy.types (e.g. Object, World, ViewLayer, etc.).

(related: How do I register &#39;Scene&#39; properties with Python in 2.8?)