An accurate characterisation of the physical properties of galaxies at cosmic dawn is key to understanding the origin of the high abundance of UV-bright galaxies at z≳10. We exploit deep NIRSpec PRISM observations of GHZ2 to constrain the sources of ionising radiation and the properties of the ISM in this bright, compact, and highly ionising galaxy at z=12.3. We measure with high significance the prominent N IV, C IV, He II, O III, C III, O II, and Ne III emission features previously detected in shallower observations, and confirm the detection of the N III] I^»1750 multiplet, yielding tight constraints on the N/O ratio, which is found to be imeq2 times the solar value. We also detect the Mg II I^»2800, [Fe IV] I^»2833 and Si II I^»1812 doublets, the H8+HeI I^»I^»3889 blend, and the Si IV+O IV] I^»I^»1400 absorption complex. The O III I^»3133 fluorescence line is only detected in the first observing epoch, implying variability on a rest-frame time span of 19 days, strongly suggesting the presence of an active nucleus. Combining the NIRSpec dataset with available optical and far-infrared constraints from MIRI and ALMA, we show that the emission spectrum of GHZ2 cannot be reproduced by single-density spectro-photometric models. Multi-zone photoionisation modelling performed with the HOMERUN code demonstrates that star formation must be occurring in a strongly stratified ISM, where both low-/intermediate-density gas and high-density regions (log(ne/cm−3)≳4) coexist. The GHZ2 emission landscape is consistent with either a composite star-formation plus AGN scenario, or with star formation occurring in a combination of radiation- and matter-bounded regions. Purely radiation-bounded stellar models fail to reproduce the observed He II emission, making an additional hard ionising component unavoidable.