I often get asked to help people who are having issues with their semi-autos not going into proper slide lock. Most are ready to send the gun to the smith or buy new mags, and sometimes it is an issue with the gun or magazine. However, often times we find that the shooter is pressing on the slide lock while they are shooting.
Even a little pressure on the slide lock, when you are shooting the last round, can prevent the gun from functioning properly. Take a look at your grip and make sure your thumbs are not resting on the slide stop.