Outline_auto-scroll losing sync

Steps to reproduce

Auto-scroll tracks the scrolling on main documents accurately only when all headings are unfolded. If some headings are folded, auto-scroll loses sync between main text and items in outline.

Did you follow the troubleshooting guide? Y

Expected result

Auto-scroll is supposed to track outlines accurately when scrolling main text regardless main text is folded or not.

Actual result

Auto-scroll becomes out of sync with outline lagging behind.

Environment

SYSTEM INFO:
Obsidian version: 1.12.7
Installer version: 1.12.7
Operating system: Windows 11 Pro 10.0.26200
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: Minimal 8.1.7
Snippets enabled: 2
Restricted mode: off
Plugins installed: 14
Plugins enabled: 14
	1: Note Refactor v1.8.2
	2: Persistent Graph v0.3.2
	3: Minimal Theme Settings v8.2.3
	4: Style Settings v1.0.9
	5: Commander v0.5.5
	6: Mindmap NextGen v1.16.0
	7: Periodic Notes v0.0.17
	8: Calendar v1.5.10
	9: Sortable Tables v1.0.0
	10: Regex Replace v1.1.3
	11: Omnisearch v1.29.3
	12: BRAT v2.1.0
	13: Reader Highlighter Tags v1.0.5
	14: Recent Files v1.7.9

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information