First some background information:
The Specific Gibbs function $g$ which is defined as the Gibbs function $G$ per unit mass; $g=\frac{G}{m}$, along with specific entropy: $$s=\frac{S}{m}\tag{1}$$ and specific volume: $$v=\frac{V}{m}\tag{2}$$
I know that the state function for Gibbs free energy is $$G=H-TS\tag{3}$$ where $H$ is the enthalpy, differentiating $(3)$ and applying the the first law of thermodynamics leads to $$dG=-SdT+VdP\tag{4}$$
I also know that the Maxwell relation for Gibbs free energy is $$dG=\left(\frac{\partial G}{\partial T}\right)_PdT+\left(\frac{\partial G}{\partial P}\right)_TdP\tag{5}$$ Comparison of $(4)$ with $(5)$ shows that $$S=-\left(\frac{\partial G}{\partial T}\right)_P\tag{6}$$ and $$V=\left(\frac{\partial G}{\partial P}\right)_T\tag{7}$$ Finally, forming the specific Gibbs functions corresponding to $(6)$ & $(7)$ from $(1)$ & $(2)$ these specific variables are therefore related by $$s=-\left(\frac{\partial g}{\partial T}\right)_P\tag{8}$$ and $$v=\left(\frac{\partial g}{\partial P}\right)_T\tag{9}$$
During a phase change the specific volumes of specific entropies of the two phases differ but the $\color{red}{\text{Specific Gibbs functions are the same by definition}}$ i.e. during any phase change from a state $1 \rightarrow 2$: $$v_1\ne v_2$$ $$s_1\ne s_2$$ $$\color{red}{g_1=g_2}$$
Marked in red are the parts for which I do not understand. What does the author of this text mean "by definition" the specific Gibbs functions are the same?
Could someone please explain to me why the specific Gibbs functions are equal during a phase change? I have searched the internet for an answer but cannot find a plausible explanation.
I know that phase transitions take place isothermally since the heat energy supplied is used to break bonds (considering vaporisation) instead of increasing the average kinetic energy of the molecules (temperature) so that this hidden (latent) heat is being used to change the phase (liquid $\to$ gas in this example) without changing the temperature.
But why must the pressure remain constant?