Huh, I see the issues. Let me explain the application, may be I'm doing it wrong. I wanted a reasonably fast comparator to enable down-programmer in a power supply when output goes, say, +50mV above the set voltage. I don't need precision here, +-10mV variation is fine over the whole temperature range (say 25-50C). What do you think about using comparator with offset? I wanted to do it this way because of low component count.
BTW, I wanted to use LP311DR, which is a slower comparator, and it might help with stability. I ordered it about a week ago, but it will only arrive in a week or two (ordered from lcsc using cheap delivery, so I have to wait now).
An alternative could be, for example, lift the reference voltage with an instrumentation amplifier, but then I'd need a 50mV low-impedance reference to drive REF pin. But that would add quite a few parts: reference, reference buffer, instrumentation amp... I think there was an opamp or in-amp with a buffered reference pin, but can't find it now and it seems to be an exotic part.
PS I'll test the circuit with 10x gain and report results here. I'm curious to see the result.