Replace a relay with an analog switch
In your first diagram, as long as abs(V2) is &lt; 5v, the switch voltage stays within the rails. Which means it will work.

In the second diagram, there is no mechanism shown to maintain the switch voltage between the rails. Depending on what you haven't shown, it may work, or it may not.