Modest YouTube Branding in YouTube Embed Block

<?php
/**
* Modest branding for YouTube embed block
*/
function wd_modest_youtube_branding( $block_content, $block ) {

     if ( "core-embed/youtube" === $block['blockName'] || "core/embed" == $block['blockName'] ) {
          $block_content = str_replace( 'feature=oembed', 'feature=oembed&modestbranding=1&showinfo=0&rel=0', $block_content );
     }
     return $block_content;
}
add_filter( 'render_block', 'wd_modest_youtube_branding', 10, 3);