tell us what Brand/Model/size Inverter you have, and whether only the fridge is powered by it, or whether it also powers some/all of your outlets...
if you fridge was powered normally when 'plugged in', and the inverter was OFF, then you should have a 'sub-panel', as part of your Main Panel where your breakers are, that allows shore power to 'pass thru' to your fridge circuit whenever you are plugged in, without the need for the inverter to be 'ON'...although you can certainly leave the Inverter ON all the time, regardless....
if your Inverter normally HAS to be on all the time in order for your fridge to have power, even if you are plugged into shore power, then you have a 'dedicated' Inverter for your fridge - meaning that it MUST be on all the time to power your fridge, while the batteries that are being used to power the Inverter are also being CHARGED when you are plugged into shore power.
(probably not the case here, since you said the fridge 'was' working, until recently)
If you have the first version, with a sub-panel, and you are plugged into shore power, and you then find that while it worked before, but now you must turn the inverter 'ON' to keep it powered, you have either lost all of your Shore Power(it's breaker tripped, maybe), OR you have lost 1/2 of your 50amp Shore Power, which can also happen, leaving some of your RV's outlets and appliance and air conditioner without power, while some other things DO have power.
If that's the case, you'll need to check several things:
A) the Shore Power breaker's wire(s) could be loose, and have lost their connection
B) your ATS(auto transfer switch) has a loose wire
C) your Main Panel's 50amp double-pole breaker has a loose wire
D) the circuit breaker for the fridge has a loose wire
'14 Palazzo 33.3 bunkhouse 34' diesel
KingTailgater2 Dish HD, 100w/5a SOLAR, BlueOx
100,000+mi since '14 - US, Alaska, Canada.... formerly Georgia, then NorthCarolina, now Alabama : )