The detent is just a plunger with a little button that engages the sight post flange and a spring to hold it up against the sight post. There are only a few things that could cause this:
Sight is beyond the reach of the detent and spring;
Detent plunger is stuck on something;
Spring is crushed.
Spin out the front sight and remove the detent and plunger. Check that the right spring is indeed what you have. Check that the spring is OK. Check that the plunger can move freely in hole it travels in.
I have seen wrong springs (there is a bunch in a kit and some folks don't get the right springs in the right places), crushed springs, and various glues.
Fingernail polish responds to acetone or lacquer thinner. Put it only exactly where you want it. Loctite and other glues require some heat - a heat gun is about perfect. Go slow (medium power settings) to avoid ruining any finish on it. If it is Parkerized, just rub it down with an oiled paper towel (the heat may drive off the oil). If it is painted, you may need to repaint it. I hope it was not glued.