Opamp demonstrates slew rate much lower than specified in datasheet
There are several contributing factors to the poor performance of the circuit:

1. Insufficient supply voltage

Minimum Supply Voltage for the TL072 is listed as 10V. Using only 5V is well below this minimum.

2. Insufficient supply voltage headroom

The TL072 is not able to drive its output up/down to either voltage rail so expecting it to output 1V under Vcc is not realistic. See this question for more details.

3. Improper component selection

You should be using a comparator in this circuit and not an opamp. While the diagrams and basic function of an opamp and comparator are similar they are not substitutes. See this question for more information.