From gov website :
Testing after your isolation period has ended
If you have tested positive by PCR for COVID-19, you will probably have developed some immunity to the disease. However, it cannot be guaranteed that everyone will develop immunity, or how long it will last. It is possible for PCR tests to remain positive for some time after COVID-19 infection.
If you have previously received a positive COVID-19 PCR test result, you are not usually advised to be re-tested within 90 days of this result. **You should only have a PCR test within 90 days of a previous positive PCR test if you develop any new symptoms of COVID-19 or you are required to take a PCR test upon entry into the UK.
If you are tested within 90 days of a positive PCR test result for either of these 2 reasons, and the PCR test result is positive, you must stay at home, self-isolate and follow the steps in this guidance again.
If you have an LFD test within 90 days of a previous positive COVID-19 PCR test, for example as part of a workplace or community testing programme, and the result of this test is positive, you and your household should self-isolate and follow the steps in this guidance again.
If it is more than 90 days since you tested positive by PCR for COVID-19, and you have new symptoms of COVID-19, or a positive LFD or PCR test, follow the steps in this guidance again.