The Door is Crooked
If the screws are fine, visually inspect the gap on both sides of the door while it is closed. Is it even all the way from top to bottom? Or does the gap tend to get smaller as you approach one side. This crooked alignment is typically from a “sprung” hinge that has worn down over time.
Start the repair by popping out the pin of the top hinge (i.e. this assumes the larger gap is near the top). Use a pair of diagonal cutting pliers to gain leverage under the hinge pin and tap it up with a hammer.
Now grab a crescent wrench and place it over one of hinge knuckles attached to the door. The wrench should be perpendicular to the plane of the wall. With a firm grip, pry over the door knuckle over about an 1/8 of inch towards the face of the door. Do the same for each knuckle attached the door on this hinge (i.e. usually 2 or 3).
Next, grab some wood shims and place them under the far end of the door (i.e. away from the hinge side) to help align the hinge knuckles. Keep adding shims until they line up.
Place the pin back into the hinge about 90% of the way. Leaving the pin out just a little bit makes it easy to remove again in case the fix does not work. Try shutting the door. If it works, great! Hammer the pin in the rest of the way. If not, check to see if the gap has closed and repeat the process.