Hmm. Tough one.
The only thing I could come up with is this:
If you have a definite "layer that gets turned off", and not any random
number of combinations of layer switching, then you could try and ensure
that connectors of layer A are always on-top-of, or beneath layer B. There's
a setting in Page Setup > Layout Tab that specifies "Line jumps for
frontmost/backmost connectors".
In this way, the layer that get's hidden would be the layer that does the
jumping.
I realise that this will only help if your layer setup is very specific, and
you are only hiding one layer and not the other.
--
Hope this helps,
Chris Roth
Visio MVP