Issues with IR detection

Hey guys so just one more question, I have gotten my IR sensors to work, kind of. I can get the sensor to detect something but once my sensors detect something it returns to reading clear even when an object is in front of it. So for example if I wave my hand in front of it, it will say something is there and then immediately return to saying clear even while my hand is still there, to get it to say it see's something again I have to pull my hand away and return it but when I return it it will only say it saw an obstacle once. Is there a simple fix or a bigger issue?

void setup()                                 // Built-in initialization block
{
  pinMode(3, OUTPUT);  
  pinMode(5, OUTPUT); 
  pinMode(11, OUTPUT);  
digitalWrite(3, HIGH);
digitalWrite(5, HIGH);
digitalWrite(11, HIGH);
  
  pinMode(13, INPUT);   
}  
 
void loop()                                  // Main loop auto-repeats
{
  int irLeft = irDetect(3, 13, 38500);       // Check for object on left
  int irRight = irDetect(5, 13, 38500);       // Check for object on right
  
  if((irLeft == 0) || (irRight == 0))        // If both sides detect
  {
     Serial.println("Stop something is ahead!!");             
  }
  else                                       // Otherwise, no IR detected
  {
     Serial.println("Clear!!");      
  }
delay(100);  
} 

int irDetect(int irLedPin, int irReceiverPin, long frequency)
{
  tone(irLedPin, frequency) ;              // IRLED 38 kHz for at least 1 ms
  delay(2);                                  // Wait 1 ms
  int ir = digitalRead(irReceiverPin);       // IR receiver -> ir variable
  delay(2);                                  // Down time before recheck
  return ir;                                 // Return 1 no detect, 0 detect
}

Here my code and I added a picture to try and show what is happening.