When the spike changes sufficiently, there is no mechanism by which the vaccine works, except in so much as that person may have already had sars-cov-2 with no symptoms and built additional immunity to other topologies of the system.
Since everyone will eventually host the virus at some time scale, the best one could hope for is initially being vaccinated, then catching a similar virus with no symptoms to build immunity and so on. Vaccines are simply preparation for the inevitable exposure to spreaders with R0>>1.