A semiconducting nanowire proximitized by an s-wave superconductor can be tuned into a topological state by an applied magnetic field. This quantum phase transition is marked by the emergence of Majorana zero modes at the ends of the wire. The fusion of Majorana modes at a junction between two nanowires results in a 4π-periodic Josephson effect. We elucidate how the 4π periodicity arises across the topological phase transition in a highly-transparent short nanowire junction. Owing to a high transmission coefficient, Majorana zero modes coming from different wires are strongly coupled, with an energy scale set by the proximity-induced, field-independent pairing potential. At the same time, the topological spectral gap-defined by competition between superconducting correlations and Zeeman splitting-becomes narrow in the vicinity of the transition point. The resulting hybridization of the fused Majorana states with the spectral continuum strongly affects the electron density of states at the junction and its Josephson energy. We study the manifestations of this hybridization in the energy spectrum and phase dependence of the Josephson current. We pinpoint the experimentally observable signatures of the topological phase transition, focusing on junctions with weak backscattering.