Several threads discuss this with many brands of pistols.
I like the slide to release, but never read of one releasing 'before' the mag hit the battery rail--fully in.
I'd try to make that happen again at home and see if you were pushing the mag release or what the heck caused the slide to let go.
A couple of years back, I accidently released a mag at a match with my weak hand.