Script to view animation preview panel in fullscreen
There are two things necessary to set the fullscreen mode successfully:


Wait for the workspace to be switched
Create a custom context for the operator


The first part can be accomplished by adding an application handler that is triggered after the dependency graph is updated. The second part is necessary to set the correct area to fullscreen. This can be solved by iterating through the areas of the current screen to find VIEW_3D.

You can leave the fullscreen mode by pressing CTRL + ALT + SPACE.

import bpy

# Press CTRL + ALT + SPACE to leave fullscreen mode 
def view3d_fullscreen(dummy):
    bpy.app.handlers.depsgraph_update_post.remove(view3d_fullscreen)
    context = bpy.context.copy()

    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            for space in area.spaces:
                if space.type == 'VIEW_3D':
                    space.shading.type = 'RENDERED'
            context['area'] = area
            bpy.ops.screen.screen_full_area(context, use_hide_panels=True)
            break

bpy.app.handlers.depsgraph_update_post.append(view3d_fullscreen)
bpy.context.window.workspace = bpy.data.workspaces['Animation']