Greetings anshimm,
If you haven’t already, to help us isolate, can you test using the shortcut Shift + Command + 5 in another app and see if the same issue persists? Let’s test it somewhere neutral like your desktop.
We’d also like to call your attention to the different option in the Screenshot toolbar that come up when pressing these three keys together - How to record the screen on your Mac.
If you’re looking to record or a portion of the screen, be sure to choose the ‘Record a certain portion’ option to the right. It’s the selection just to the left of the word Options. Otherwise the entier screen is selected and when you click you should see a stop button appear in the menu bar meaning the whole screen is being recorded or possibly taken a screenshot of.
Thanks.