A pocket that gapes
Measure the mouth on the paper and on the cloth. If the cloth mouth is longer, it grew while you sewed, or it was stretched as you topstitched. Stay it with a tape cut to the paper length, then sew the pocket on again. A bar tack at each end stops the corner from opening further. A patch pocket gapes when the top edge was not interfaced and the cloth collapsed. An in-seam pocket gapes when the opening was not reinforced at the ends. The pocket pages are how to sew them. This page is the mouth that will not stay shut. This varies by fabric. Test on a scrap first. A knit mouth grows more than a woven one. Tape it.
Do not take the extra out of the hem of the garment. The mouth is the long edge.
If the bag is too small, the mouth is pulled open by the contents. That is a larger bag, on the pocket-bag page.