If the problem is a side to side issue, figure out if the hammer needs to move out away from the barrel or in towards it.
Then, remove the lock.
If the hammer needs to move in towards the barrel, get a sharp chisel or knife and lightly scrape the shoulders or surfaces at the top of the lock mortise that the lock plate rests against. There are usually several places in that area that the lock rests against. Then, retry the lock in the stock. It doesn't take much material removal in the lock mortise to move the hammer quite a lot.
If the hammer needs to move away from the center of the barrel, scrape the surfaces or shoulders at the bottom of the lock mortise.
To give an example of how little of the amount of material that needs to come off, I've seen several guns that had a problem and scraping off the varnish the company sprayed into the mortise was enough to fix things.