This article states that developing COVID-19 after being infected with the SARS CoV2 virus can protect 83% of the infected by the 5th month mark. In addition it says that the virus may still exist in the upper airway of those previously infected and still be a source of transmission.
To quote this article in bibliography:
Mahase, Elisabeth . “Covid-19: Past infection provides 83% protection for five months but may not stop transmission, study finds." BMJ 372, (2021): n124. https://doi.org/10.1136/bmj.n124