Adding https://www.youtube-nocookie.com to your Discourse allowed iframes site setting should fix the issue. You will need to click the “Rebuild HTML” button for posts that have already been published to get the videos to show up.
The update shouldn’t change anything for posts that have not been published with the Block editor. When I try publishing the markup you shared, I get the exact same result when I try publishing the post with the old WP Discourse code as I do when I publish it with the updated code.
What version of WordPress is your site on?