Algae grows due to acessive nutrients (fish waste, fish food, ferts etc) and light due to photosynthesis.
So when your water gets favorable conditions algae grows again.
Avoid light or you can also use chemical to decrease nutrients so that algae can't grow up.