Quantum phase transitions in proximitized Josephson junctions