You right-handed? If so, consider the following ...
Sometimes the more diminutive pistols can experience more movement within a shooter's hand under recoil, and this can cause the shooter's hand to momentarily shift position against the gun's controls (unknown/unrealized to the shooter).
I had another instructor bring me a P239 .40 one time where the owner, and the instructor, experienced the slide failing to lock back on an empty mag. It didn't exhibit that issue when I tried the gun, though.
When I asked the right-handed instructor to shoot the pistol left-handed, the "problem" didn't happen again. (Coincidentally, this put his strong-hand thumb on the opposite side from the slide stop lever, where his thumb could no longer rub downward against the lever's engagement surface.
Now, I've watched other shooters sometimes unknowingly have their pistols (especially .40's) torque withing their grasp just enough so that either they strong-hand or support hand thumb bumped upward against the slide stop lever, creating what's sometimes called "early slide stop", where the slide locks back with ammunition remaining in the magazine.
I even watched one long-time owner of a PPk/s have his support hand thumb press inward against the mag catch button, at just the "right" moment during recoil to depress the mag catch and drop the mag.
His clenching grip and support-hand thumb just happened to momentarily align itself with the mag catch. (another right-handed shooter.
) He said his Walther had been doing it for years, and he'd just accepted it happening.
When I pointed out what his grip/finger positioning was doing and had him slightly change his grip, what he'd accepted as a long-time "problem" with the gun disappeared. He cussed himself a bit.
Even experienced shooters may sometimes come across a particular make/model/caliber pistol that creates a minor issue when it comes to the positioning of the hand & pistol controls during the moment of recoil
If the MK40 doesn't exhibit the "problem" when shooting it left-handed, consider the possibility of it being a shooter-induced issue that requires some minor correction on the part of the shooter.
It happens. BTDT.
Just some thoughts.