Switchable invisibility of dielectric resonators