Custom method casting does not work

Silverstripe Version: 4.7.3

Hey *!
I’ve the same situation in my PageController discribed like here:

But this does not work for me: template output is still

<h1>This is my header</h1>

and NOT

<h1>This is my header</h1>

as “promised” in documentation…

I’ve no idea what goes wrong with it.
Can anyone help me out?

Thank’s in advance!