First thing would be to ask if it does this in a freshly-created user account, just to confirm that it's not something weird installed under your user.
Second thing would be if you've installed any system hacks/additions/utilities, even ones that you wouldn't think would affect screenshots. Always a possibility that one of those could cause unexpected issues.
Third is a note that it's at least possible that it's a hardware issue. I say this because I once had a failing graphics card and was surprised to see the screen artifacts show in screenshots; apparently the MacOS grabs the data straight out of the VRAM buffer, which would include glitches.
Now, since your screen looks just fine, this doesn't seem likely, but there's at least a chance that something is going wrong that's screwing up however it is pulling the data off the graphics system.