I had a door that did this for a while and I was only able to keep it shut with the deadbolt locked, otherwise it would open if the wind blew hard enough (quite startling when it first happened). Anyhow, after contemplating for some time on how to fix the issue, I decided to give my idea a try. Upon looking at the door closely, I noticed that the gaps were uneven near the trim, I could actually see daylight coming in at the bottom, knob side of the door. This is what we call "not square". In effect, the door being misaligned kept the plunger in the door from going into the the hole all the way. Taking matters into my own hands, I decided to unscrew the hinge flange into the door on the bottom and middle. I then used some thin particle board to create a shim and replaced the screws with longer ones to hold the flange securely in place. It worked!! I needed to adjust the shim on the bottom once and now the door stays closed. Maybe this could help someone with the same problem I had or if you have any better ideas, let me know.