This is a known issue in core with the rendering process and there are no core solutions at this time.
Main issue: https://www.drupal.org/project/drupal/issues/953034
Honorable mentions:
One suggested workaround of checking for region content with page.second_sidebar|render|striptags('<img><iframe><object><svg>')|trim|length doesn't solve the issue for this theme. As mentioned in this comment, the "the real problem is that <drupal-render-placeholder> gets replaced with either something empty or not."
This is a known issue in core with the rendering process and there are no core solutions at this time.
Main issue: https://www.drupal.org/project/drupal/issues/953034
Honorable mentions:
One suggested workaround of checking for region content with
page.second_sidebar|render|striptags('<img><iframe><object><svg>')|trim|lengthdoesn't solve the issue for this theme. As mentioned in this comment, the "the real problem is that<drupal-render-placeholder>gets replaced with either something empty or not."