Discovered today on Vector 2022 master branch, there appears to be a blank space where the ToC would be on Vector 2022 special pages.
By checking out git commits in Vector one-by-one, a related change was introduced in on January 13, with Table of contents elements should not be rendered where none available (which sounds like it should prevent this very problem).
Somehow this has only appeared recently and does not affect production. Potentially could be a core change that changes the value of the data-toc array from null to an empty array (guessing).
The following patch explicitly sets null on the ToC array and fixes this issue:
The CSS issue is due to a missing class "vector-sidebar-container-no-toc", which is set when data-toc evaluates to false in mustache.