Grid-connected converters are exposed to the loss of synchronisation with the grid during severe voltage sags particularly when operating under weak grid condition which introduces voltage and frequency volatility. This paper presents employing machine learning methods besides modifying the converter control scheme to enhance the transient stability of power synchronization control (PSC). For early detection of synchronization instability of PSC to provide adequate time for taking correcting control actions, an encoder stacked classifier is proposed which is trained to be robust against data corruption and added noise. Then, by integrating the proposed instability detection scheme to the synchronization loop of PSC, a phase freezing mode is introduced to avoid losing synchronism during grid faults. It is disclosed that the frozen synchronization loop, which is activated by the proposed instability detection scheme, can ensure synchronization stability of PSC. Time-domain simulations are conducted to confirm the presented findings.