Op-Amp inputs are sinking too much current in comparator mode
Modern op-amps aren't meant to be used as comparators. If you want a comparator, use a comparator, not an op-amp.

Observe the simplified schematic in the datasheet:


The diodes I circled protect the device from extreme excursions in the differential input voltage. You might be able to get it to work by adding 10 or 100 kohms in series with the op-amp inputs, but it would be better to just buy a part designed to work as a comparator.

Also notice that this is not a rail-to-rail input op-amp. All bets are off if you use it with 0 V on the input and on V-.