The long-term effect of the COVID-19 pandemic on body weight has not been sufficiently analyzed. This study aimed to analyze changes in body mass index (BMI) during and after the COVID-19 pandemic among a large pediatric population attending health care clinics. This retrospective longitudinal cohort study utilized electronic medical data of 106,871 children (52.1% males, median age 8.2 years at pre-pandemic assessment). Each child had at least one BMI measurement recorded pre-pandemic and two additional measurements: one during the pandemic and one post-pandemic. Obesity rates increased from 12.8% pre-pandemic to 15.4% during the pandemic, slightly decreasing to 15.0% post-pandemic. BMI-standard deviation scores (SDSs) increased during the pandemic, in both sexes, across all ages and all socioeconomic position (SEP) clusters, and in children with pre-pandemic underweight or normal weight (all P<0.001). Post-pandemic, BMI-SDS decreased but remained above pre-pandemic levels, particularly in younger children (aged 2-6 years) and those from low/medium SEP clusters (all P<0.001). BMI-SDS continued to increase in children aged 6.1-16 years, those of Arab ethnicity, and those in the high SEP cluster. The COVID-19 pandemic correlated with an overall increase in BMI-SDS, which decreased post-pandemic but remained above pre-pandemic levels. Effective policy interventions to prevent pediatric obesity are crucial.