Esoteric flags like "isHTML" don't fly with Parsoid
https://github.com/wikimedia/mediawiki/blob/master/includes/parser/Parser.php#L4895
Currently, Parsoid expects parser functions to return wikitext during preprocessing. However, the presence of this "isHTML" flag means that some parser functions return html that the legacy parser armours for them. That's what is happening in T257344
Maybe they should do something that's more aware of the $parser->getOutputType()? That's what the patch in T257344 tries to do so that only wikitext is return when preprocessing.
Something to be aware of when designing Parsoid's setFunctionHook in T268144