Not all virus infections create a protecting immune response in this way. HIV evades the immune process by regularly modifying the amino acid sequence from the proteins around the area on the virion. This is recognized as "escape mutation" since the viral epitopes escape recognition by the host immune reaction. https://baglamukhi49483.pointblog.net/not-known-details-about-viral-73970406