When mine did that, the oil level was not full. It wasn't low, but it wasn't full. When I was going uphill (or downhill, I don't remember) the oil would flow away from the oil level sensor and the generator would die. When I topped off the generator's oil level, it never happened again.
Bobbo and Lin
2017 F-150 XLT 4x4 SuperCab w/Max Tow Package 3.5l EcoBoost V6
2017 Airstream Flying Cloud 23FB