It’s possible, but not that easy for a variant to both evade immunity and attach to cells via the spike protein. Some of the vaccines utilize the whole inactivated virus as the target. However, most of them target the spike protein or the receptor binding domain of the spike protein. Most natural neutralizing antibodies from infected people target the spike protein.
The Delta variant has mutations that allow it to both increase affinity to the ACE2 receptor and evade neutralizing antibodies. Antibody affinity is reduced but not eliminated. In fact, many of the variants of concern have similar mutations. This suggests to me that the types of mutations that will both increase transmissibility and reduce antibody affinity are going to be limited. This also suggests that boosters may be useful for both waning immunity and dealing with variants of concern.
1: The original coronavirus has spike proteins and a bunch of other proteins as well.
2: We develop vaccines based only on the spike proteins. Some people get those vaccines, and so never come down with a significant infection.
3: Some other people do not get the vaccine, and so do get infected. Their immune systems learn to recognize all of the proteins in the virus, not just the spike proteins.
4: A new version of the virus evolves, with spikes very different or absent, but with the other proteins the same as or very similar to the original. The vaccines, which were based only on the spike proteins, do nothing at all against this new virus, but natural immunity, that includes a reaction to the non-spike proteins, is still at least somewhat effective.
Speaking as a non-expert, this sounds to me like it could be possible, but I wouldn’t expect it to be likely. There are reasons they chose the spike proteins as the basis of the vaccines. Those are the ones on the outer surface of the virus, so they’re what the body’s defenses will have the most exposure to. And I think that they’re also critical to the process by which the virus bonds to and invades cells, such that any virus without them probably wouldn’t be able to infect cells at all.