I've been using Command-Shift-4 to capture screenshots, and then using the share icon on the top right of the screenshot I send them off to Notes or a friend on Messages. However they are not saving if I share them. If I don't share them, and let the little thumbnail on bottom right of screen slide right off screen, the file will save. But If I do share it, it won't write to the drive. They are shared and then disappear. Opening the image from Notes or Messages reveals that they are not named "Screenshot" but only Image 12-20-21 or whatever the date is. How can I get the screenshots to save to file even if I'm sharing them immediately upon capturing them?
The file is not saved as a screenshot until you click "Done" in the editor, or the thumbnail preview dismisses itself.
If you Share it, or drag the thumbnail preview to another application, then it won't get saved.
I'm not aware of any mechanism to change this behaviour. You might want to submit Feedback to Apple, asking for an option to change this behaviour.