You have several possibilities, for example:
* instead of setting the property to invisible, temporarily replace one graph with empty data. (see attached sample code).
* Don't use autoscale, but use ArrayMinMax on the visible y values, the set the yrange.minimum and yrange.maximum accordingly.
*switch the second plot to a second y scale while invisible and back to scale 1 when visible again.
* any other variation of the above.