there are 4 reasons it does lock back under normal use...
1) the slide stop has a problem (the tooth is bad /broken or cannot lift up, stuck in the barrel...( weird mags)
2) the slide itself has a problem
3) the magazine does not lift the slide stop (bad follower, weak mag spring)
4) the slide does not come all the way back (weak ammo, strong spring)
Start doing some tests
with the slide in battery (NO AMMO)
insert an empty mag...
Did I say empty mag no ammo
does the slide come back with reasonable pressure
does it lock back?
does the slide lock engage well in the slide stop or just barely
you should actually be able to watch and see the slide stop pop up as it comes back....
Try different mags...
If it's not engaging can you manually engage the slide stop without too much pressure ..
Is the slide stop rotating freely?
you might add a drop of oil on the barrel link does the barrel link itself rotate freely
Oil is not your enemy in working things out.. It can be a bad thing in use or in dusty/dirty environments..
Is the slide stop pin in plunger tube OK?
If you don't know what the parts are
#3 is the barrel link..