I don't believe it's actually the case that once you are infected by the delta strain your body has lasting immunity to that same strain.
It looks like that also is affected by age and other constraints: https://www.nature.com/articles/d41586-020-00502-w