It's not that pharmacy perfumes are necessarily bad, but you're right that a lot of them don't last long. The thing is, durability and a low price don't always go hand in hand, but there are decent options if you know where to look. What I've noticed is that the concentration of the perfume matters more than the brand. "Eau de toilette" lasts less, so if you find an "eau de parfum" at a reasonable price, you're already winning. Some pharmacy brands have versions in higher concentration that maybe you haven't tried. It also depends on the type of fragrance: oriental and amber ones tend to last longer than light florals, so if you don't have a thing against more intense scents, that's the trick.
On the other hand, you don't necessarily have to spend a fortune on premium brands. There are mid-range brands that offer really good durability without being luxury. I have colleagues who swear by some options that cost between 40 and 60 dollars and last them almost all day. The trick is reading reviews from people who actually need durability, not the ones that just talk about how it smells. There's also the option of applying a bit more or using the technique of putting a drop on your pulse points (neck, wrists, behind the ears) where the heat helps it disperse better. And if you find something you like, buy it on sale or at duty-free shops when you travel, because the same perfume sometimes costs quite a bit less in those places.