Ditto with the above, and a quick few check lists.
Start off by pulling the FCG, and make sure that when you shove the selector detent up in the receiver channel, the detent is center of the selector channel and had enough protrusion before it's lower wider end bottoms out in the step channel.
Here what we are looking for, with the pin centered to start with, and enough protrusion into the channel.
Selector detent pin not drilled center of channel straight up and down isntead.
Now if the detent channel is straight up and down, but the tip does not protude upwards like in the first photo, then receiver channel is a stepped channel, so 1/8"" drill bit is good to clean the upper narrow channel if the selector pin is binding, while the lower channel can be cleaned up with a 9/64" drill bit, as well as having to make the lower channel higher if the detent pin tip is not traveling up high enough into the selector channel isntead.
Next on the detent pin, dull the tip of it with a 400 sandpaper, so it fits the detent's in the selector groove a hell of lot better. Also take a look at the detent grooves in the selector, since might be a small bur that is preventing the selector tip from engaging the detents correctly in the selector.
Detent tip too sharp on the below pin, and will be like a BB in a box car to allow a lot of selector movement on the safe/fire position, instead of the angle side of the pin engaging the sides of the selector detent.
The last item, is a lot of after market pistol grips has the detent spring channel too deep in them, and it does not allow the spring to put enough tenion on the detent pin to the selector detents in the first place. Hence when pistol grip channel is too shallow, causes the spring to coil bind up and your can move the selector since the detent can not pop out of the selector detent, while too deep, not enough spring tension isntead.
The quick fix if the spring channel is too deep in the pistol grip, use a small cut off section of a Q'tip shaft to shim the pistol grip channel shallower to solve the problem.
So again, double check the selector in the receiver channel to make sure it square to the selector, has enough trip travel up in the receiver into the selector channel for a good engagement to the selector detents, The tip of the selector dulled enough to fit the selector detent side channel sides well with selector detents cleaned up too, then to make sure that the detent spring has enough tension (depth of grip spring channel shimmed if needed), right before the point that the grip channel is too shallow and causes the spring to coil bind up when the grip is installed.