The miniaturization of optical switches is a promising prospect with the use of phase-change materials (PCMs), and exploring various strategies to effectively integrate PCMs with integrated optical waveguides represents an intriguing research question. In this study, an ultra-compact integrated optical switch based on PCM is proposed. This device consists of a Ge2Sb2Te5 nano-disk and an inverse-designed pixelated sub-wavelength structure. The pixelated sub-wavelength structure offers customized refractive indices that conventional materials or structures cannot achieve, leading to an improved insertion loss (IL) and extinction ratio (ER) performance of the device. Furthermore, this structure enhances the interaction between the optical field and GST, resulting in a reduction of the device size and the inserted GST footprint. With an ultra-compact device footprint of 0.9 µm × 1.5 µm, the simulation results exhibit a low IL of 0.45 dB, and a high ER of 18.0 dB at 1550 nm. Additionally, relevant studies show that this device is able to perform reliably despite minor variations in the manufacturing process.