Possible causes:
Old, worn out detent. Though it takes a long time to wear the tip of the detent, if the selector groove is rough, it can wear prematurely. You should remove it and stand it next to a new one, and take a close up picture of them both, as they're small, and the differences aren't always easy to tell with naked eyes.
Left is a stainless steel KNS detent, right is a detent that came from a lower parts kit that didn't see much use.
In the picture you can see much more detail, such as the dime a dozen detent's base isn't even straight
Pistol grip's spring hole is shallower, thus exerting more spring pressure than a grip with a deeper spring hole. Trimming the spring by a coil or two would solve this if this is the case.
The selector itself, specifically, the detent groove
The trigger group
The receiver (there are some M16 receivers with questionable specs)
I'll be happy to troubleshoot it with you,
[email protected]