When the User removes stuff between a heading and a template VisualEditor creates incorrect wikitext by removing the last newline between template and heading, thus the heading is not parsed.
Example is the edit before this one: https://www.mediawiki.org/w/index.php?title=Requests_for_comment/Streamlining_Composer_usage&diff=next&oldid=1747181