(Shopify) Error: Missing {{content_for_layout}} in the body section of the template

I removed “main” section with “{{content_for_layout}}” in theme.liquid:

<main role="main">
  {{ content_for_layout }}
</main>

Then, I got this error as shown below:

It seems like it’s impossible to remove it but I really want to remove it. Are there any ways to remove it? and it’s also OK to get the same effect of removing it.

Why would you want to remove that? content_for_layout is important for the rendering of the code from the specific templates (like product, page, collections, etc).

You could try wrapping it in a {% comment %} but it makes no sense to do this.
https://shopify.github.io/liquid/tags/template/