Using the <template> Tag to Hide Content Blogger Inserts
A method that wraps a fake </body> marker in a <template> tag to get around Blogger's block on nested comments, hiding its auto-inserted content.
Machine-translated from the Chinese original.
TL;DR: just wrap the content you want to hide in
<template></template>.

While hacking up a theme following the article Notes on accessing Blogger from mainland China, I found that the method it offers,
Replace
</body>with<!--</body>--></body>
no longer works.
Let me briefly explain how the original method worked. When Blogger inserts the content we want to get rid of, it probably just does a simple string replacement: str.replace(r'</body>', target + r'</body>', 1). But we rig up a fake </body> and comment it out, so the content Blogger inserts also ends up inside the comment.
The reason the original approach stopped working is that Blogger’s own code added a comment of its own, and HTML apparently can’t nest comments (this is somewhat uncertain).
Stack-Overflow-driven development After some digging, I found this: Are nested HTML comments possible?. It mentions several ways to hide content; I went with wrapping a fake </body> in a <template> tag.
Just replace </head> with
<template></head></template>
</head>
and replace </body> with
<template></body></template>
</body>
and that’s it.