Having issues saving altered value in a view pre render
You should set the format of body to full_html try with:

function mytheme_views_pre_render(Drupal\views\ViewExecutable $view) {
  if ($view-&gt;id() == "news" &amp;&amp; $view-&gt;current_display == 'block_1') {
    foreach ($view-&gt;result as $key =&gt; $row) {
      $body = $row-&gt;_entity-&gt;body-&gt;value;
      $stripped_img = preg_replace('/&lt;img[^&gt;]+\&gt;/i', '', $body);
      if ($stripped_img != $body) {
        $row-&gt;_entity-&gt;body-&gt;setValue($stripped_img);
        // Here set the format of body to full_html
        $row-&gt;_entity-&gt;body-&gt;format='full_html';
      }
    }
  }
}