iOS allows something similar. twitter (X) will also add a logo. I believe reddit did the same but i stopped using their app a while ago.
Personally, I wish iOS didn't even facilitate this.
edit: to be clear, I don't think iOS should notify the app at all. The app could register areas as "invisible to screenshots" perhaps - I'm torn on that functionality.