Simple Op-Amp setup for current sense has a strange working range
The op-amp is powered from 5 volts and the signal to be measured is 20 mV raised to a common mode voltage of 4.99 volts. The LM358 has an input common mode range of 0 volts to Vcc - 1.5 volts hence, you are asking too much from this device. If you raised the power supply (just for the op-amp) to greater than 6.5 volts it will work.

The problem more specifically is that the voltage on the +Vin pin is 99% of 5 volts or 4.95 volts. If you lowered the gain by increasing the input resistors to make the voltage on +Vin less than 3.5 volts then it would start to work.

If you powered the op-amp from 24 volts and your signal is top-side referenced to 24 volts then you could lower the gain such that +Vin was no more than 22.5 volts. This would make the input resistors 680 ohm and you'd have a front-end gain of 14.7 but you could apply a secondary stage to give you the overall gain that you need.