Send the 4006 back to S&W for examination & repair.
If the hammer does not hold in single action when releasing the slide via the slide stop lever, or by manually retracting and releasing the slide, I'd suspect there's probably an issue involving the hammer and/or the sear.
Presuming, of course, that the manual safety lever is in the Up/Off Safe - Ready to Fire position when the slide is being released and this is happening. If it's in the Down/On Safe position, then the hammer should decock and not hold in the single action/cocked position. I'm not trying to infer you are unfamiliar with how the TDA guns operate, but sometimes an owner/user can overlook something like the position of the lever when they're distracted, thinking something may not be working properly.
I would NOT try to shoot the gun until it's been examined and determined safe for use again ... but, just out of curiosity, did this happen when you were trying to shoot the gun, or just when handling & manipulating it while using live rounds? (I'd use dummy rounds for examination purpose.)
Whether or not there are live rounds in the magazine, and the magazine is in the gun at the time this is happening, might be a coincidence.
FWIW, just a while ago one of our folks had a fairly new 4566TSW that started not holding in single action during live fire. It happened sporadically (but obviously shouldn't happen at all) and they didn't bring it to my attention until they were done shooting. I checked the gun at the bench (unloaded) and was able to replicate the the hammer failing to hold when running the slide at least once.
The first thing I did was completely disassemble the gun and give it a good cleaning. Why? Because the inside was terribly dirty and fouled. Fouling had congealed around the hammer and sear to the point that the sear appeared to be sticking. Once the parts in the frame were clean and dry, I couldn't get the hammer to follow the slide again when running it by hand and the gun passed all bench checks for normal functioning. I had the user and another instructor take it down range and run a couple boxes of ammunition through it. The gun ran just fine, as intended. (I also discussed how to properly clean and lubricate a TDA gun without using an excessive amount of solvent/CLP, too.

)
I was almost expecting a worn hammer (SA notches) or sear (nose), but it turned out to be a heavy accumulation of fouling, combined with what appeared to be excessive solvent/CLP where it should not have been (inside the frame's working parts), which was causing the sear to stick.
I have, however, come across an occasional older gun which had a worn hammer and/or sear. It just depends, and such conditions need to be checked and identified in any particular gun so they can be properly addressed and resolved.
LE duty guns can sometimes be subjected to "maintenance" at the user level which can border on neglect and abuse ... but that's just a personal observation and opinion.
Let us known what S&W determines to be the case in your gun.