Making sure that doesn’t happen is a matter for proper management.
The rules for using GM insect-resistant varieties requires the use of “refugia” occupying a certain percentage of the sown area not too far away from the GM plantings. Those refugia are sown with non-insect resistant plants; insect populations living there will provide a pool of sensitive individuals to outbreed and resistant ones which might arise on the GM plants.
This style of management is based on ideas very similar to those for antibiotic usage in medicine; use the drugs in ways which prevent or limit the appearance of resistant strains.
So far the management of GM insect-resistant plants has worked extremely well. In nearly ten years of use, there have been no reports of resistant insects. Nevertheless, eternal vigilance is necessary; biology is by its very nature opportunist and if a chance for resistant insects to develop, they will and we must stop them.
One way is to ring the changes on the nature of the insect-resistant protein in the GM crop. There are many to choose from and by not using particular ones for too long, insects will always be faced with a new hurdle to overcome.