Pressing Esc from screenshot dialog should work same as back button
Pressing Esc after taking a screenshot closes the entire program, though the most intuitive callback should be, in my opinion, rather cancelling and going back to the first windows to make a second attempt (the same as the Back arrow in the header bar), which would make more sense.