The response of superconductor-normal-metal-superconductor junctions to magnetic field is complicated and non-universal because all trajectories contributing to supercurrent have a different effective area, and therefore acquire arbitrary magnetic phases. We design an hourglass-shaped Josephson junction where due to the junction symmetry the magnetic phase of every trajectory is approximately equal. By doing so we are able to increase a critical field of the Josephson junction to many flux quanta per junction area. We then analyse how breaking the symmetry condition increases the sensitivity of the junction, and show that our device allows to detect supercurrent carried by ballistic trajectories of Andreev quasiparticles.