I really like using Flameshot for screenshots. You can take screenshots without any popup. But in order to take a screenshot of a window you'll need to have a (simple) custom script to grab the window coordinates using something like xwinfo and/or xdotool. I'm sure there's scripts u can find online for exactly this purpose, but if you can't find one ill gladly make one for u (it will only be a few lines). You may even be able to make it a one-liner
Also, this method of capturing a window isnt as powerful as the gnome-screenshot method. gnome-screenshot is able to capture the entire active window even if parts of it are obscured by other floating windows that are partially blocking it. Capturing a partially obscured window with flameshot will show both of the windows (ie; the active window and the part of the other window that is in frame)
Some other useful flameshot commands:
flameshot screen (captures current screen. Can be supplied with a number to designate a specific screen if u use several)
flameshot full (captures all screens in single screenshot)
flameshot gui (prompts you to select an area of the screen to capture. It also has lots of tools for modifying thr image before saving it, such as adding arrows, text, shapes, etc.)
Lastly, there are many settings u can configure by running flameshot config
Also, im guessing you already know but you can create keyboard shortcuts to trigger any of these commands, including the command to execute a script that captures the current window