I think the X/Twitter iOS app and the reddit app are guilty of this. I find myself way too often typing something out, then barely touching the edge of my phone, and my entire comment is gone.
On Twitter you can't swipe out of the tweet compose screen. You have to explicitly click the "Cancel" button in the top left, and if you have anything written it'll pop a dialogue to either delete the contents, save as a draft, or cancel (go back to composing)
I'm not sure how you'd swipe out of this screen.