Not what you want, but have you tried:
Settings > Core Plugins > Outline
If you then open the right sidebar, you will see a navigable outline of your note based on its headings.
You can drag and drop from the outline to the note if you want to create a TOC in the file itself.
Angel