Another way to "pin" the current function definition to the top of the editor is with sticky scroll.
Sticky scroll is a feature that shows the current scope at the top of
the view port.
This was introduced in v1.70 and is still undergoing improvements. And is currently under an experimental setting so expect some changes.
In v1.71 it will no longer be "experimental" and so the setting will
become:
Editor > Sticky Scroll: Enabled
Until v1.71 comes out here is the current information:
First enable this setting: Editor > Experimental > Sticky Scroll: Enabled
There will be a toggle command to show/hide the sticky scroll lines: editor.action.toggleStickyScroll

Clicking on that sticky function definition will take you to the top of the function.
Control/command click in the sticky scroll will take you to the definition.
Another demo from the v1.70 Release Notes: Sticky Scroll

Currently you can modify the background color and shadow color with these colorCustomizations in your settings.json:
"workbench.colorCustomizations": {
"editorStickyScroll.background": "#444",
"editorStickyScrollHover.background": "#f00",
"scrollbar.shadow": "#fff9" // with a little opacity for the dropShadow
},
There is a related setting:
Editor > Experimental > Sticky Scroll: Max Line Count
Defines the maximum number of sticky lines to show
Default for above is 5.