As explained in the video below, viruses are recognized by the immune system via small segments (or epitopes) of their antigens (which can be compared to a set of clothing), and once we have immunity through vaccination or previous infection, our immune systems are able to quickly identify those antigens and neutralize the virus, preventing severe disease and death.
When a new variant emerges, it retains most of its epitopes, even though it has ‘changed its clothes’ a bit via mutation. And when confronted with a variant, the remaining familiar epitopes are sufficient for our bodies to recognize the virus and trigger the immune response that protects us. It’s highly improbable that the virus would change so much as to become unrecognizable.