Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?

Try this code:

add_filter( 'wp_targeted_link_rel', '__return_false', 9999 );

function widget_text_replace($text) {
    $search = array('rel="noopener"');
    $replace = array('');
    $text = str_replace($search, $replace, $text);
    return $text;
}
add_filter('widget_text', 'widget_text_replace');