What ammo? Not all .22 LR is created equal in terms of case material, case hardness and rim thickness.
Also, a common cause of that problem is failure of the slide to go completely into battery, even though it may look closed. Try pushing the slide forward before firing and see what happens. Make sure the chamber and barrel are completely clean and also that the extractor area is clean.