Confirming this is a bug
As a patch if you go into your version of toggle switch and add update
as the handler for the canvas reset
event it should work
You may have already seen but anvil-extras includes an alternative switch and slider component that may be useful for you.