I needed to override one of the theme [TwentyTwentyTwo](https://make.wordpress.org/core/2021/10/06/introducing-twenty-twenty-two/) template from a custom plugin, and I wanted to use one of Gutenberg's blocks.
I see that in the *templates* files blocks are used by just writing the corresponding html comment.
So I tried editing the *template/single.html* file in

```html
<!-- wp:post-title /-->
<!-- wp:custom-block-i-defined /-->
<!-- fest -->
<div>Test</div>

```

and created a file *plugin.template.html* with the same content in my plugin.

When I visit a single page with the theme's template, it renders the blocks fine, but if I do so using

```php
add_filter( 'template_include', 'override_template' );
function override_template( string $template ) {
    return 'path/to/the/plugin.template.html';
}

```

the rendered page only contains the **Fest** div, but inspecting the page reveals the comments that didn't become blocks.

Am I using a wrong filter? Should I call some function to "hydrate" the blocks?