A few questions...
Did you remove the lock and try the lock to see if it functions at the full and half-cock positions?
Did you then take a hard look at the sear where it comes into contact with the full-cock notch?
IF the lock doesn't function right when removed, sometimes there is crud or a teeny tiny metal burr that is preventing the sear from properly engaging the full-cock notch. This needs to be cleaned and removed.
Also if the lock is functioning or if it is closer to how it should work but sometimes acts odd..., check the sear as that sometimes indicates a damaged sear, usually part of the sear is chipped or broken. The deeper half-cock position then engages but the damaged edge of the sear won't properly engage the full-cock notch. In this case you need a new sear.
HOWEVER, I'm guessing that the lock will work fine when removed but when replaced into the stock, OOOPS it's back to malfunctioning. A very common problem. Some wood from the stock is rubbing, either against the sear, or against the tumbler on the lock, perhaps also the main spring, and causing the malfunction. It's amazing how little friction from the interior wood is needed that will cause some grief. So you need to scrape a little wood from within the lock mortise to correct this.
I always when this happens, is take a lit candle, and on the lock which I have degreased and has no grease or oil, I use the candle to deposit soot on all the working interior parts. Then I replace the lock, and give it a small tap with a wood mallet (OK full disclosure it's a wood crab mallet). Then I carefully remove the lock and voila, where the soot has transferred to the interior of the lock mortise is where the stock wood is touching the lock. I scrape the sooty areas on the stock, then repeat. After two or three times, I then try the lock again, to see if it's still misbehaving. Remember, you just scrape or sand, you don't take of more wood than a teeny tiny bit.
This will probably cure your problem. OH and remember if it gets really damp, or you're outside in damp weather for a long period, the problem might return due to the wood absorbing moisture. Just correct the problem the same way.
LD