1. Vertical Scrollbar Thumbnail Mode
VS Code has this effect by default (at least I haven't configured it specially):

Actually, VS can also be set this way: go to Tools → Options → Text Editor → All Languages → Scrollbar, then check "Use vertical scrollbar thumbnail mode (M)". That's it.

Check out the effect:

2. Show or Hide In-App Toolbar
This one is about WPF. By default, the in-app toolbar is displayed during debugging:

It can be turned off, though we usually keep it on: Tools → Options → Debugging → XAML Hot Reload

You can toggle it dynamically:

Reference: