Usually cold sores or herpes can appear like 1-2 times every year, if you are prone to them, and they can appear pretty much any time of the year.
However, there can be different factors for it. It doesnt necessarily have to be because of a lower immune system or being sick.
For example, heat can cause an outbreak. Like wearing your jacket over your lip and breathing underneath, when it is cold or raining, or things like wearing a face mask.
The most plausible explanation for his Tour loss last season was not having enough base after his L-B-L. Affecting his recovery after the ITT and the heat.
After the win was out of reach, he still performed very well in the last days of the Tour and later at the Worlds.