Yes, I have experienced this problem with several pistols. Usually, it has been a holster, pressing against the magazine release button. In those cases, a better holster was the remedy. A well-thought-out holster design is important, especially for pistols with push-button controls.
One problematic situation was with an original-design SIG P220, with a heel-clip magazine system. When carrying the pistol in my duty holster, the heel area of the weapon would make contact with the seat back, while I was seated in the patrol car. The external portion of the heel clip tended to snag on the seat fabric, occasionally causing a partial release of the magazine. IIRC, I discovered this had happened, about three or four times, during a two-tear period, 1991-1993. I learned that a colleague had been backed into a chain-link fence, during a struggle with a criminal, at which time the heel-clip of his SIG P220 had snagged the fence, causing a partial release of the magazine.
My remedy for the snagging heel clip was to sell the pistol, with a plan to acquire an “American-style” P220, only to discover that the newer P220 pistols were substantially redesigned in the grip frame area, and just did not work as well in my hand. I had intended to use my GP100 as a short-term interim duty handgun, but, instead, used that GP100, and then a K-Frame revolver, as duty handguns for four years, before returning to using autoloading duty pistols, in 1997.