This will however have different meaning for the outer-most shortcode tag. If you use {{% somewhere nested, that shortcode’s inner content will be rendered as Markdown on its own – which is the reason it does not show up in the outer ToC.
To put your question into its original perspecitve: There is no way to tell Goldmark (the Markdown renderer we use as default) that what’s inside the section is Markdown.
That’s what I would call “a dirty hack”. I think you are trying to do something weird inside of the context shortcode.
The ToC is working with headers, why would you have the need to nest headers?
{{% means “process markdown in what you return” as an order to Hugo. Are you aware, that it can only return processed markdown and putting it inside of each other ends it up in a loop that processes because it needs to process before the other once can process? Process?
I would say this is probably more or less something that you need to work through with a .Scratch or maybe take a step or two back and rethink the whole construction. Because see 1. If it’s about ToC there is probably no need to nest headings or whatever happens in that shortcode.