If statment looks like it is being ignored

Very novice programmer here.

Building a setup to control a Halloween prop. I have an photoelectric sensor that will feed ground to the Arduino as the trigger. I want the sensor to set a "flag" when tripped. I will then remove the flag after a set amount of time.

I stripped down my program as far as I can while retaining the problem. My last IF statement is intentionally false for this test, so the sensorFlag should never go to "0". Because of this the Arduino should not be able to turn the relay off once it is on (set to "1"). This is the only statement in the code that can turn the flag off as far as I can tell

How the code actually runs: When I block the beam the relay turns on. When I remove the block the relay turns off. I also removed the last IF statement from the code and the relay turns on and will not shut off. This indicates to me that the last IF statement is responsible for turning off the relay. How can this be with the statement being false?

int sensorFlag = 0;

void setup() {

  pinMode(1, INPUT_PULLUP);    // Sensor to pin 1, must supply ground to trigger
  pinMode(5, OUTPUT);          // runes relay
  pinMode(13, OUTPUT);         // LED indicator tied to sensor 1
  
}
void loop() {
  int sensor1 = digitalRead(1);
    
  if (sensor1 == LOW )  {       // When sensor is triggered it will set the sensor flag to "1"
    sensorFlag = 1;               
  }
  if (sensorFlag == 0) {        // When sensor flag = 0 turn off relay and LED
    digitalWrite(13, LOW);      
    digitalWrite(5, HIGH);      
  } 
  if (sensorFlag == 1) {        // When sensor flag = 1 turn on relay and LED
    digitalWrite(13, HIGH);    
    digitalWrite(5, LOW);  
  }
  if (10 > 100); {              // this statment is false, why is sensor flag going to 0?
    sensorFlag = 0;
  }
}

Thank you X 1,000!