The sidebar does not hide the content of the footnotes; instead, it directly displays the footnote numbers

If footnotes are added to headings, such as H2 titles, in the main text, the sidebar with the table of contents does not hide these footnotes but instead adds a number. I hope this can be fixed.