Embedding a Jupyter notebook in a qmd file does not include toc links

The embed shortcode works great for including the output of a Jupyter notebook.

For some reason it's not including the toc links.

I've made sure to have the yaml clearly include toc on both the notebook as well as the qmd file, but it's not appearing in the rendered website.

The shortcode in the qmd file:

{{< embed python-for-seo.ipynb echo=true >}}

Quarto: v1.5.45
JupyterLab: v4.2.2

The notebook as a rendered HTML document (with toc):

The notebook embedded in the qmd file (without toc):

Am I doing anything wrong?

Thanks a lot!

Update: There are other cases where the toc is being displayed properly.

I'll try to isolate the issue and see if there is a certain thing preventing it, or if I'm doing something wrong with some setting.