tangent: all my pants have zipper pockets. after almost losing my phone in a taxi in dubai a long time ago, I always get pants with zippers, even though I do not always close them...
I similarly had an issue with stuff falling out of my pockets which made me get pants with zipper pockets. In the end I was disappointed. I had some pants and shorts from Fjallraven and the zippers on the pockets all failed in under a year from what I recall. I ended up switching to all Duluth Trading Co. pants/shorts. These do NOT have zipper pockets, but they DID solve my problem, somehow. The pockets are deeper and perhaps a better shape. I've hung upside down in an inversion table, pockets stuffed full with what some would call an excessive EDC, and nothing falls out.
I would say avoid excercise-y pants/shorts and pajama pants, they have particularly bad pockets. That alone helped me quite a bit. I went from more lounge-y wear to dressing like a tradesman on the average day. The Duluth Trading pants are a lot more comfortable than any blue jeans I've worn before, as well as more durable and with more pockets. I have seen some other brands with similar design but can't recall the names. I just know I got some pair from Menard's or Fleet Farm once as a gift and the pocket layout was surprisingly identical to my Duluth Trading pants. I didn't like them as much, but I don't remember any specific major flaws either. Mostly including that tidbit to sound less like an ad for DT.