This study investigates
the influence of substrate temperature
and III/V ratio on the synthesis of Mg-doped GaN layer using plasma-assisted
molecular beam epitaxy. We demonstrate that optimum growth conditions
are the result of a delicate balance between substrate temperature,
Mg flux, and III/V ratio. At low substrate temperatures, where Ga
desorption from the growing surface is negligible, a pronounced self-compensation
effect linked to polarity inversion significantly reduces net acceptor
concentration at relatively low Mg cell temperatures. Increasing the
substrate temperature allows for higher Mg fluxes, enhancing the net
acceptor concentration before reaching the collapse due to polarity
inversion. Detailed analysis of Ga desorption during growth interruptions
highlights the susceptibility of the Ga bilayer to perturbations under
varying Mg fluxes, attributed to the replacement of Ga adatoms by
Mg. We demonstrate that the polarity inversion is triggered when the
Ga bilayer is reduced to a monolayer, either by the influence of the
Mg flux or by a reduction of the Ga flux. This study demonstrates
that maintaining a substantial Ga excess, within the bilayer regime
and close to the Ga droplet accumulation threshold, is vital for preventing
polarity inversion.