Inconsistent behavior with QWIIC Mux

Hello everyone, I am getting some weird behavior when trying to read the range values from a pair of VL6180X Time of Flight sensors. I am unable to use the readRange() function on the sensor every other time I push a code change, and I’m not sure what is going on.

So far I have verified that the sensors are getting a constant 3.3v which should be enough to run them, and the sensors themselves work fine independently of the multiplexor.

Any insight into what could be going on here or would be greatly appreciated

My Code:

    void setup() {
      //Serial setup
      Serial.begin(115200);

      while(!Serial){
        delay(1);
      }

      // Mux Setup
      Wire.begin();
      tof = new Adafruit_VL6180X * [NUMBER_OF_SENSORS];
      for (int x = 0; x < NUMBER_OF_SENSORS; x++){
        tof[x] = new Adafruit_VL6180X();
      }

      if(myMux.begin() == false){
        Serial.println("Mux not detected. Freezing...");
        while(1);
      }
      Serial.println("Mux found!");

      byte currentPortNumber = myMux.getPort();
      Serial.print("CurrentPort: ");
      Serial.println(currentPortNumber);

      //Initialize Mux Sensors
      bool initSuccess = true;

      for (byte x = 0; x < NUMBER_OF_SENSORS; x++){
        if(tof[x]->begin() != 0){
          Serial.print("tof ");
          Serial.print(x);
          Serial.println(" did not begin!");
          initSuccess = false;
        }else{
          Serial.print("tof ");
          Serial.print(x);
          Serial.println(" configured");
        }
      }

      if(initSuccess == false){
        Serial.print("Freezing...");
        while(1);
      }

      Serial.println("Mux Shield online");

      delay(1000);
    }

    void loop() {
      // Time of Flight Sensor read
      float lux;
      uint8_t range;
      uint8_t status;
      for(byte x = 0; x < NUMBER_OF_SENSORS; x++){
        myMux.setPort(x);
        lux = tof[x]->readLux(VL6180X_ALS_GAIN_5);
        range = tof[x]->readRange();
        Serial.println(range);
        //status = tof[x]->readRangeStatus();
        Serial.print("Lux "); Serial.print(x); Serial.print(": "); Serial.println(lux);
      }
     
      delay(500);
    }

My Electronics setup:

https://forums.adafruit.com/download/file.php?id=80242

This is a continuation of a post I made on the adafruit forums here, and that post has a bit more info on the situation: https://forums.adafruit.com/viewtopic.php?f=19&t=173833