No.
It sounds like you need to refactor your shortcode as a partial, then programmatically call the partial from the template if the flag is set.
A common construct is to:
- Create a partial (to be called from templates)
- Create a shortcode that wraps the partial (if you need to call it from content)
layouts/partials/hello.html
<p>Hello {{ .name }}!</p>
layouts/shortcodes/hello.html
{{ partial "hello.html" (dict "name" (.Get "name")) }}
content/post/foo.md
{{< hello name="John Doe" >}}