WordPress 6 – inline container styles breaking my site

These styles are styles applied through the block settings toolbar.

This code will remove the wp-container-id class for every block:

remove_filter( 'render_block', 'wp_render_layout_support_flag', 10, 2 );

This was found on this page. It has more advice on removing block styles and altering them as well.

Also found on the above page was this code to remove all block styles on the front. It might help the second part of your question I missed.

function prefix_remove_core_block_styles() {
global $wp_styles;

foreach ( $wp_styles->queue as $key => $handle ) {
    if ( strpos( $handle, 'wp-block-' ) === 0 ) {
        wp_dequeue_style( $handle );
    }
}
}
add_action( 'wp_enqueue_scripts', 'prefix_remove_core_block_styles' );