What is the range of an IR sensor in a prototype comparing to real life application?
Just like Friis Loss in RF calculations , the same applies to optical power.
Therefore the half beam width HBW of both emitter detector and bandwidth BW of Tx, Rx path loss and gain, noise threshold of Rx and interference come to play.
Often these rated in kbps-meter products. thus if using DC only, filtering and integration for changes make garage door sensors very sensitive to 10m and Remote controllers good for perhaps 10 to 50m , more or less depending on emitter current (mA) pulse and emitter HBW for transmission with ceiling reflection. Here the carrier was in the 30kHz region with AGC and 3kHz BW in the Rx with a Q=10 BPF integrated in Rx. (Sharp/Vishay)
But without these design choices, the range might only be cm or m . Laser diode emitters obviously give more range.  Object reflection depends on reflectivity and scattering, while Object path sensitive depends on beam width.  I have used 100mA 10 deg emitter pulses and using IrDA2 detectors with binary codes to get error free detection in recessed apertures to 1deg to detect a resistor wire crossing a 1m path. You cannot do this with reflection.