Mac - Screenshot of a window

I’m trying to use Mac Shortcuts app, to take a screenshot of a Filemaker window, by name, or by position, but I can’t get the Shortcuts app to produce anything except a Screenshot of the entire window. The really weird thing, is that it will produce a png, of the window I want, but it won’t let me access this png in any useful way!! It will allow me to send it in an email etc., via the Services window, but it won’t let me simply copy it to the clipboard etc.

A single step in Shortcuts will show the window by name, when run from the as can be seen here.

Can anyone suggest how I can access this image?

Many thanks for any help you can offer.