I've learned a trick years ago that I use as needed and highly recommend to others with minor door locking issues.
The hinges are typically mounted to the door frame only with 3/4" to 1" long screws that only go into the door frame itself. It's usually 3 - 4 screws that don't provide much adjustment.
I remove one of the screws from each of the hinges and replace with a 3-4" long screws that go into the rough opening studs behind the door frame. Then I tighten them accordingly to tweak the door as required to plum it up with the frame opening to better align the door latches.
As things change due to shifting, I just re-tweak the long screws to accommodate the shifting. Beats the heck out of trimming the actually door, etc..
This tweak method might help you as well...
aka The Legendary *******!!!