Wrap iframes/embeds, but do it before oEmbed happens

WordPress embed the URLs on same filter with priority of 8

in /wp-includes/class-wp-embed.php

// Attempts to embed all URLs in a post
add_filter( 'the_content', array( $this, 'autoembed' ), 8 );

and you are parsing content after it with priority of 10 then defiantly you will get the parsed output.

You just need to do it early before WordPress embed URLs

add_filter( 'the_content', 'wrap_iframe', 5 );