The surge in omicron variants has caused nationwide breakthrough infections in mainland China since the December 2022. In this study, we report the neutralization profiles of serum samples from the patients with breast cancer and the patients with liver cancer who had contracted subvariant breakthrough infections. In this real-world study, we enrolled 143 COVID-19-vaccinated (81 and 62 patients with breast and liver cancers) and 105 unvaccinated patients with cancer (58 and 47 patients with breast and liver cancers) after omicron infection. Anti-spike receptor binding domain (RBD) IgGs and 50% pseudovirus neutralization titer (pVNT50) for the preceding (wild type), circulating omicron (BA.4-BA.5, and BF.7), and new subvariants (XBB.1.5) were comprehensively analyzed. Patients with liver cancer receiving booster doses had higher levels of anti-spike RBD IgG against circulating omicron (BA.4-BA.5, and BF.7) and a novel subvariant (XBB.1.5) compared to patients with breast cancer after breakthrough infection. Additionally, all vaccinated patients produced higher neutralizing antibody titers against circulating omicron (BA.4-BA.5, and BF.7) compared to unvaccinated patients. However, the unvaccinated patients produced higher neutralizing antibody against XBB.1.5 than vaccinated patients after Omicron infection, with this trend being more pronounced in breast cancer than in liver cancer patients. Moreover, we found that there was no correlation between anti-spike RBD IgG against wildtype virus and the neutralizing antibody titer, but a positive correlation between anti-spike RBD IgG and the neutralizing antibody against XBB.1.5 was found in unvaccinated patients. Our study found that there may be differences in vaccine response and protective effect against COVID-19 infection in patients with liver and breast cancer. Therefore, we recommend that COVID-19 vaccine strategies should be optimized based on vaccine components and immunology profiles of different patients with cancer.