in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
https://www.drupal.org/node/3407994
public function renderPlain(&$elements);