I’ve tried a few solutions to this problem and found the answer to be to replace the hinges with a continuous hinge (piano hinge). I’ve even put one, well two really, on the bathroom door and have had no problems. So I agree with Ray. Piano hinge solves the problem.