To follow up on previous advice on controlling how macOS takes screenshots, as described in “How to take better screenshot selections in macOS,” you can also choose to include or exclude a border and drop shadow when you just want to grab a window.
A thin border is supplemented in these screenshots by a drop shadow that provides contrast against a background. That’s a faux-real or skeuomorphic effect, as if a window is floating and casting a diffuse shadow, but it does make the window pop out more effectively when including it in documentation or an email.