Long COVID (LC) risk varies across SARS-CoV-2 variants, but causal inference is complicated by rising vaccine coverage coinciding with viral evolution. We examined how pre-infection vaccination status modified LC risk across different pandemic periods dominated by different variants, to disentangle the contributions of viral evolution and vaccine-induced immunity. In this prospective cohort study of Israeli adults with SARS-CoV-2 infections from July 2021-March 2023, participants completed baseline and follow-up online surveys ≥60 days post-infection. LC was defined as ≥3 symptoms within validated symptom clusters. Infections were assigned to an infection period corresponding to the predominant circulating variant (Wild type, Alpha, Delta, Omicron) at onset time. Pre-infection vaccination was categorized as unvaccinated (0-1 doses), partially vaccinated (2 doses), or fully vaccinated (≥3 doses). Generalized estimating equations estimated multivariable risk ratios, adjusted for age, sex, and follow-up time. Among 1715 participants reporting 2018 infections, LC was reported following 30·4% of infections. In models adjusted for vaccination, LC risk did not differ between the Delta and Omicron-dominant periods (aRR 1·01, 95% CI 0·80-1·26). Among partially vaccinated individuals, infections during the Omicron-dominant period carried lower LC risk than during Delta (aRR 0·62, 95% CI 0·40-0·98). LC risk did not differ by variant-dominant periods among unvaccinated or fully vaccinated individuals.