For example, this occurs when clicking "Overview of Hugo and PaperMod"
Likely related to the fixed navbar. Specifically, when you click the ToC heading, the website scrolls such that the content is visible and not covered by the fixed navbar. But it seems that the ToC calculates the active element using what's under the fixed navbar.