In this work, we present an efficient framework that combines machine learning potential (MLP) and metadynamics to explore multi-dimensional free energy surfaces for investigating solid-solid phase transition. Based on the spectral descriptors and neural networks regression, we have developed a computationally scalable MLP model to warrant an accurate interpolation of the energy surface where two phases coexist. Applying the framework to the metadynamics simulation of B4-B1 phase transition of GaN under 50 GPa with different model sizes, we observe the sequential change of phase transition mechanism from collective modes to nucleation and growths. When the system size is at or below 128 000 atoms, the nucleation and growth appear to follow a preferred direction. At larger sizes, the nucleation tends to occur at multiple sites simultaneously and grow to microstructures by passing the critical size. The observed change of atomistic mechanism manifests the importance of statistical sampling with large system size. The combination of MLP and metadynamics is likely to be applicable to a broad class of induced reconstructive phase transitions at extreme conditions.