How to apply an ID to Shortcode Embedded iframe

1.- Add this to your child theme’s functions file:

add_filter("embed_oembed_html", function( $html, $url, $attr ) { 
    if ( !empty( $attr['id'] ) ) {
        $html = str_replace( "<iframe", sprintf( '<iframe id="%s"', $attr['id'] ), $html );
    }
    return $html;
}, 10, 3);

2.- Now use </code> applying the ID attribute in the shortcode.</p>

<pre><code>$check_embeds=$GLOBALS['wp_embed']->run_shortcode(
''. $video_url .'
'
);

Hope that helps.