Remove magazine, unload magazine. Unload pistol and lock slide back with pressure upward on slide lock lever. Reinsert empty magazine(s). Release slide.
Now, with the pistol in that condition, try slingshotting the slide and releasing it several times. Each time, the slide should lock back when you pull it back. The magazine follower is what pushes up on the slide lock lever to lock the slide back and it should happen reliably, every single time, when the magazine is empty.
Remember while you're doing this: don't use the slide lock button as a "release" - pull backward on the slide while pushing it. The slide lock button on an SR9 is not and was never intended to be a 24/7/365 "slide release lever".
However, in the condition above with the magazine empty and inserted and manually racking the slide it should lock back EVERY time with absolutely no troubles.
If the slide doesn't lock back every single time when you're slingshotting it with an empty magazine, there is something wrong. It could be the magazine follower!!!! If the magazine follower doesn't come all the way up "home" it won't reliably engage the slide lock and you can have problems. If so, disassemble and clean your magazine(s) and try again. Also follow other people's suggestions about clean/lube on the lock button/assy. itself.