Toggle active state of gameobjects between 2 tags

(this is my first game so sorry if this is a stupid question) So I want every gameobject with the tag “reality1” to turn off and every gameobject tagged “reality2” to turn on when I press shift, then the opposite to happen when I press shift again. right now I have

using UnityEngine;

public class LayerToggle : MonoBehaviour
{

   bool Reality2 = false;

   private void Update()
   {
       if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift))
       {
           shift();
       }
   }

   void shift()
   {
       if (!Reality2)
       {
           GameObject[] gameObjectArray = GameObject.FindGameObjectsWithTag("reality1");

           foreach (GameObject go in gameObjectArray)
           {
               go.SetActive(false);
               Debug.Log("reality1 off");
           }

           GameObject[] gameObjectArray2 = GameObject.FindGameObjectsWithTag("reality2");

           foreach (GameObject go2 in gameObjectArray2)
           {
               go2.SetActive(true);
               Debug.Log("reality2 on");
           }
           Reality2 = true;
           Debug.Log("reality2");
       }
       else
       {
           GameObject[] gameObjectArray = GameObject.FindGameObjectsWithTag("reality1");

           foreach (GameObject go in gameObjectArray)
           {
               go.SetActive(true);
               Debug.Log("reality1 on");
           }

           GameObject[] gameObjectArray2 = GameObject.FindGameObjectsWithTag("reality2");

           foreach (GameObject go2 in gameObjectArray2)
           {
               go2.SetActive(false);
               Debug.Log("reality2 off");
           }
           Reality2 = false;
           Debug.Log("reality1");
       }
   }
}

This turns objects tagged “layer1” off, but then never turns “layer2” active. The “layer 1” objects also don’t turn back on after pressing shift again. Does anyone know the fix for this?