You leave the bathroom door halfway open and a minute later it is in the way again. Once you rule out a draft, look at the line formed by the hinges. A slight tilt can make the door move even when every screw feels tight.
Check when the door starts moving
Turn off nearby fans and close windows that can cause a draft. Leave the door at several angles, including about halfway open, and watch which way it moves. If it drifts in still air each time, check the hinge line. If it moves only when a fan runs or a window is open, deal with the air movement or use a door holder.

Check the hinge jamb for plumb in two directions
Plumb means straight up and down. Put a long spirit level against the hinge jamb with the door open and inspect the bubble. Check both the surface that carries the hinge leaves and a surface at a right angle to it. Use a flat part of the jamb and keep the level clear of the stop, hinge barrels and projecting trim.

A tilt in either direction can let gravity swing the door toward a lower position. A straightedge held against the barrels can also reveal one hinge that sits out of line with the others. If the measurements disagree, inspect the hinge seats before deciding to reset the frame.
Secure loose hinges and check the gaps
Open the door slightly and lift the latch side while watching the hinge leaves. Support the door before tightening any loose screws. Repair stripped holes so the screws can grip. A clean recess lets the hinge sit flat and keeps one leaf from pushing the others out of line.

Close the door and inspect the gaps after this adjustment. If they look even and the door stays in place, the hardware may have been the whole problem.
Use a holder or compatible friction hinge for a slight drift
For a door that clears its frame and latches easily, a removable wedge is the simplest way to keep it open at a chosen angle. If you want the door to stay where you leave it without a wedge, look for a compatible adjustable friction hinge. Check the door weight, thickness, hinge dimensions and the product’s installation directions.

For a fire rated or self closing door, follow its hardware requirements and keep the closing function working. If a normal passage door still rubs or has a large tilt, correct its alignment before adding friction.
Reset a tilted jamb if the door needs realignment
If the jamb is tilted enough to cause rubbing or unreliable latching, it may need to be set plumb. With the door supported or removed and the casing off, check the shims behind the hinge locations. Paired tapered shims can fill the space between the jamb and framing without twisting the jamb. Adjust in small steps while checking the level in both directions.

Check the head gap, the strike fit and the opening width before you secure the jamb. If the wall opening has shifted, several doors moved at once or you would have to disturb unfamiliar framing, have a carpenter assess it.
Retest the swing and latch at several angles
Remove the support and move the door slowly through its full swing. Pause at several open angles and let go. It should stay close to where you leave it without rubbing the frame or feeling stiff at the hinge. Close it gently and confirm the latch catches without lifting the handle.

If it holds in one spot but drifts elsewhere, check the hinge line again before increasing friction. The best time to catch a remaining bind is before you replace trim or fill the old screw holes.