This issue was not recently introduced. Hackfmt changed its preferred way of formatting this code. The new style breaks the syntax highlighter, as it seems to miss the end Heredoc token. The current Github highlighting matches the broken behavior.
function _(): void {
$x = Str\format(<<<END
END
);
$y = '';
Cls::someMethod();
}
function _(): void {
$x = Str\format(
<<<END
END
);
$y = '';
Cls::someMethod();
}