Comparator Output Unstable
These devices are really fast, and your impedances at the input pins are in the 10K range.  Only a little parasitic capacitance will cause oscillations.  When you remove the signal, tie the input to ground near the part.  This is one way to lower the impedance on the minus input.  You will have to also lower the impedance on the plus input by either adding capacitance or lowering the resistance.  If you need the fast response, try for matched input impedance on the inputs with a value around a few hundred ohms or less.  Your layout looks good.  If you don't need single-digit nanosecond response, you could also try a more mundane comparator.

To get the impedance down, try adding a resistor between point op_amp_2 and ground near the comparator of 499 ohms (your input op amp will have to drive this load; if it can't, keep the resistance as low as you can.)  This will probably keep you from oscillating when you remove the input.  Then change R6 to 499 and adjust R21 and R5 to keep the same ratio.