How to use MediaUpload outside of editor

The answer is actually several steps that took me lots of experimentation, but it comes down to the following code that you need to compile using something like webpack and extract out the libraries, etc:

// MediaUploadFilter.js
import { MediaUpload } from '@wordpress/media-utils'
 
const { addFilter } = window.wp.hooks
const replaceMediaUpload = () => MediaUpload

addFilter(
  'editor.MediaUpload',
  'core/edit-post/components/media-upload/replace-media-upload',
  replaceMediaUpload
)

Essentially this class I have stripped down for you to see is being called during init hook:

<?php
public function __construct()
{
    add_action('admin_menu', [$this, 'setAdminMenus']);
    // ...
}
public function setAdminMenus(): void
{
    $pageMenuObject = add_menu_page(
        'Classmate Profile',
        'Classmate Profile',
        'edit_classmates_profile',
        'classmate-profile',
        [$this->displayHandler, 'displayPage'], // a function loading a view
        'dashicons-admin-users',
        21
    );

    add_action('admin_enqueue_scripts', static function ($hook) use ($pageMenuObject) {
       /**
         * Make sure that we load the scripts specific to the add to release page
         */
        if ($hook === $pageMenuObject) {
            $pageMenuData = ClassmateProfileData::getInstance(); // Grabs data for user
            $allPageData = [];
            if ($pageMenuData) {
                $allPageData = $pageMenuData->getPageData() ?: [];
            }

            static::enqueueLibraryAssets(); // See below abstract function I pasted below

            wp_enqueue_script(
                'plugin-classmate-profile',
                mix_plugin_uri('/assets/js/ClassmateProfile.js'),
                ['plugin-media-upload-filter', 'wp-editor', 'wp-block-editor'],
                PLUGIN_VERSION,
                true
            );
            wp_localize_script(
                'plugin-classmate-profile',
                'ClassmateProfileData',
                $allPageData
            );
        }
    });
}
// This is from the parent abstract class for the class I am calling it in
public static function enqueueLibraryAssets(): void
{
    wp_enqueue_style(
        'plugin-application',
        mix_plugin_uri('assets/css/app.css'),
        ['wp-edit-blocks'],
        PLUGIN_VERSION
    );
    wp_enqueue_media(); // MUST HAVE THIS! Loads the files you need...
    wp_enqueue_script(
        'plugin-library-manifest',
        mix_plugin_uri('assets/js/manifest.js'),
        ['lodash', 'react', 'react-dom', 'wp-components', 'wp-i18n', 'wp-element', 'wp-editor'],
        PLUGIN_VERSION,
        true
    );
    wp_enqueue_script(
        'plugin-library-vendor',
        mix_plugin_uri('assets/js/vendor.js'),
        ['plugin-library-manifest'],
        PLUGIN_VERSION,
        true
    );
    wp_enqueue_script(
        'plugin-media-upload-filter',
        mix_plugin_uri('assets/js/MediaUploadFilter.js'),
        ['plugin-library-manifest', 'plugin-library-vendor'],
        PLUGIN_VERSION,
        true
    );
}