I know the question is for Visual Studio Code, but in the fully featured Visual Studio, the same problem is apparent. Here is my "solution".
I did this, and although not perfect, it helps!!
Tools/Options/ search for "sticky", check "Group the current scopes within a scrollable region of the editor window", Maximum sticky lines to 3, and choose "Prefer outer scopes".
Visual Studio will then present you with the namespace, class, and function that the top line of the editor area is in. See the image attached here.