Sonoff m5 2c randomly loosing power

Good Day

I hope everyone is well.

I need some assitance. We have a project with multiple sonoff m5 2c, 1c and 3c switches as well as NSPanels and 4ch Pro as controllers.

The problem is that the sonoff m5 range looses power, the unit is completely dead. Removing the unit and testing power on the cable shows 220V on the input cable which is correct. Once we reconnect the AC power to the device it opeates perfectly for some time, then randomly starts again. We have tried diiferent electrical cables, new circuit breakers , still the problem persists.

I have as a test swopped 2x sonoff m5 2c with a Nspanel, this unit works perfectly on the same power cables that was running the sonoff m5 2c.

The whole home runs on an inverter with solar backup.

Has anyone else exprienced this.

I am stuck