If someone switches on a light for a Jew in a dark room on shabbat, the Jew would be obligated to leave the room to avoid benefiting from the light (I won't bring up the exceptions and details here).
I have never seen an answer to this question i.e. what if that light was already on, and then they switched it off and then back on again?
My instinct is to say that the Jew would have to leave as it's still an identical halachic situation, but I am hoping to be proven wrong.
For example, if a toddler plays with the light switch and turns off the lights and then back on again, does everyone have to leave?
Or if a non-Jew walks into the room, thinking nobody is there and turns off the lights, and then sees a Jew and apologises and immediately puts them back on.