Add a capacitor between ADJ and ground, to "remember" the voltage of the ADJ pin for the very short time while the switch moves from one plot to another.
With R5=240 ohm and e.g. 10uF, I get a few milliseconds. My switch is not that fast. And the regulator should also be able to regulate quickly.
You're right. There is no way to protect against the switch going open circuit, without a voltage spike, for an indefinite period.
How slow is your switch?
What voltage spike is acceptable?
You're overthinking this.
Use a larger capacitor. The current through R1 is constant. I = V
REF/R. The voltage rise on the capacitor depends on the current, time and capacitance. ΔV = t*I/C
It won't affect the transient response. It will improve the ripple rejection and is even recommended on the data sheet. Add some protection diodes to the regulator and you're done.
Spice simulation showing a 1.04V spike when R1 = 240R and the switch is opened for 200ms.