Topological superconductivity holds promise for fault-tolerant quantum computing. While planar Josephson junctions are attractive candidates to realize this exotic state, direct phase-measurements as the fingerprint of the topological transition are missing. By embedding two gate-tunable Al/InAs Josephson junctions in a loop geometry, we measure a $pi$-jump in the junction phase with increasing in-plane magnetic field, ${bf B}_|$. This jump is accompanied by a minimum of the critical current, indicating a closing and reopening of the superconducting gap, strongly anisotropic in ${bf B}_|$. Our theory confirms that these signatures of a topological transition are compatible with the emergence of Majorana states.