Are you able to say what such software is called please because that is something I've long wanted to do
I use Firefox as my browser and it is built into that. Default install hides it away under settings but you can move it to the toolbar. Being part of the browser makes it more reliable but it still fails if the scrolling window is very long - entire match list for example - but good for shared match lists etc. Also fails if the window sits in front of the main window - Ancestry display images in that way which is a nuisance.
If you prefer stand alone programs there are lots of free/donation programs available. I use PicPic on occasion but the new version now installs a "nagging" app at same time as the main program install. Just uninstall the "nagging" app after you install PicPic. Very modern intuitive interface.
Screen Captor is another stand alone program and it will work with screen on screen such as Ancestry but it takes a lot of trial/error to achieve it. I use it very rarely.
PM me if you want more details on Firefox screen capture tool. As you say capturing a vertical scrolling window is so useful and not just in genealogy.