The way VSCode does it (see doc).
H1 no longer in view but appears in sticky.
H2 no longer in view either and appears in sticky as well.
EDIT: I’m willing to do this myself but I’m new to Obsidian and before I attempt to make a plugin I would love for somebody to tell me if the plugin system current supports this type of functionality or not.
Thanks all for the time.