The gender disparity in school grades, known as the grade gender gap, has become a focal point for researchers, educators, and policymakers. Despite this heightened interest, there remains a scarcity of longitudinal studies addressing this issue. This study seeks to address this gap by examining the grade gender gap in schools using longitudinal data from Rimini, Italy. A Bayesian Beta regression with splines is devised to detect gender differences across different cohorts of students and along the educational journey from primary to upper-secondary school. Our findings reveal a significant gap in favour of female students, which widens during secondary school years but diminishes in younger cohorts.