ThisHave you disassembled the bolt?
Yes. That’s first thing to check. The safety lever is spring loaded and has a rounded probe that detents into a milled pocket at each position. Those milled pockets can have a burr on the edge that will catch the detent probe. Easy to smooth off the rims/edges of the pockets if they have burrs. The other possibility is also as gumpy posted- gunk interfering with the decent spring or other part of bolt lock up.This
Pull it apart and check for a burr, or muck caught in it, give it a good clean, lubricate and re assemble
Gumpy