Removing extra large generated images disables all crops

add_filter( 'intermediate_image_sizes_advanced', function ( $sizes ) {

$allowed = [ 'thumbnail', 'medium', 'large', 'medium_large' ];
foreach ( $sizes as $name => $size ) {
    if ( ! in_array( $name, $allowed ) ) {
        unset( $sizes[ $name ] );
    }
}


return $sizes;
} );

I ended up setting an array with the crops I would allow and then unset anything that wasn’t there.