I created a space and imported a Word document, choosing Import as a New Page, split on level 4 headings, and the Documentation theme. I got the TOC in the sidebar, but it was collapsed rather than expanded one leve.
I created another space and did the same thing, except choosing Replace Home, and got no TOC in the sidebar.
I deleted both spaces and tried the first approach again, still no TOC.
?