Render a Twig block inside the same template

Code
<?php

$path 
__DIR__ '/templates/';

$template = <<<ND
{% extends "base.html.twig" %}

{% block body %}
    {{ block("part") }}
    <p><strong>regular content</strong></p>
    {{ block("part") }}
{% endblock %}

{% block part %}
    repeating content
{% endblock %}
ND;
$name 'string.html.twig';

$loaders = [
    new 
Twig\Loader\ArrayLoader([$name => $template]),
    new 
Twig\Loader\FilesystemLoader($path),
];
$loader = new Twig\Loader\ChainLoader($loaders);

$twig = new Twig\Environment($loader);

echo 
$twig->render($name);
Result

This is the Twig base template


The embedded template:

repeating content

regular content


repeating content

Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8