@return string is wrong because the $this->getContext()->getRenderEngine() call can return an instance of the \Magento\Framework\View\Element\UiComponent\ContentType\Html class, and its render() can return an instance of the \Magento\Framework\View\TemplateEngine\Xhtml\ResultInterface (particularly, \Magento\Ui\TemplateEngine\Xhtml\Result), not a string: