There's a bunch of what-if's here, bunch of unknowns. Is the inverter running off a dedicated house bank, or off the regular truck batteries? How many? Total amp hours? The compressor kicking on and off can be caused by two things, one is low or no refrigerant (freon), the other is low voltage (which over time will kill the compressor). It may be the inverter, as pure sine wave is better for motors, and that particular motor (in those refrigerators) really wants pure sine and not modified sine. If the inverter is a true sine wave inverter, it'll output a true sine wave whether the truck is running or not.
The fact that the fridge runs better (cools quicker, and colder) when driving, then doesn't stay cool when parked, that one screams low voltage. When the truck is running the alternator is supplying plenty of voltage, which the inverter can piggyback off of, but when parked the batteries must hold that 12.2 volt or higher, and it sounds like when the truck is running the batteries are giving he inverter 12.6 or 12.8 volts (maybe more), but when parked the fridge draws the batteries very quickly down to less than 12 volts, which will cause the compressor to run extremely hot and very inefficiently.
This can be bad batteries (or the wrong kind for this type of application), or it can be battery cables that are too small for the load (or too long between the batteries and the inverter). For a 3000 watt inverter (3000 watts divided by 12 volts = 250 amps), the cables between the inverter and the batteries should be 3 feet max, and AWG 2/0 in size. Even if you never use more than 1500 watts, it would still be 125 amps minimum cabling, so it would need to be 3 feet max and #4 AWG cable, but that still be too small for the nearly constant draw the fridge requires. #2 AWG would really be the absolute minimum to keep the cable from getting too hot. Properly crimped cable lugs is also a hot spot, literally, since an improperly crimped lug causes excessive resistance, and thus increased heat, and a voltage drop to the inverter.
FWIW, I have a 3000 watt pure sine wave inverter that needs repair, for a year and a half now. I'll get around to it eventually. In the meantime I'm using a POS Cobra 1500 watt modified sine wave inverter that I know can't be good for the refrigerator's compressor. I've got a house bank that consists of four 125-amp hour "hybrid" marine batteries (essentially the same as "truck" batteries), and have high dollar Cobra Cable Ultra-Flex cables, 2/0 in size, and even higher dollar Panduit cable lugs. I run a
MicroFridge Combination Model 4.8MF-7TP (mine is a little older than the new ones with the "Dual Charging Station", which is two electrical outlets on the front of the microwave) and have had it in the van for a little over 3 years. Over these 3 years it's been unplugged and off power for perhaps a month in total. Still works great. Haven't had to change the temperature setting, freezer is till frost-free and it keeps ice cream frozen hard. It is sitting on top of a some carpet with a heavy carpet pad underneath, and it's bolted to the wall. It ain't movin'.
Batteries
MicroFridge