Guessing that you have 240Volt residential non-simultaneous electric water heater? And that you have 30 amp breaker and 10 gauge wire. And that water heater is located within 100 feet of breaker box. And there are no leaks running hot water out of tank. And that you installed fully brand NEW elements of same wattage as old elements. And that fully brand new thermostats were installed, and wiring exactly duplicates wiring that was present before. And that factory-insulation was re-installed over elements and thermostats.
1) Guessing the 'hot water shut off' means the ECO red reset button located on upper thermostat keeps tripping and cutting off electric power to water heater?http://waterheatertimer.org/How-to-troubleshoot-electric-problems-with-water-heater.htmlhttp://waterheatertimer.org/images/WH-w-combined2-1000.jpghttp://waterheatertimer.org/How-to-test-water-heater-wires.html
2) If the ECO is tripping, then water is getting too hot, or there is shorted wire located near the upper thermostat, .
Typically replacing both thermostats and replacing elements will solve this problem .... assuming that new thermostats and elements are good, and wiring correct.
Double-Check your wiring on upper and lower thermostats.
Test wires for short.
Make sure factory-insulation is re-installed over thermostats so cool room temperature will not affect temperature reading.
Check that thermostats sit flat against steel tank.
Many short draws hot water can also cause stacking event that will trip circuit breaker.
3) Add comment and say what you find using checklist above.
Be careful to explain findings fully, using same words found on links above, so illuminated diagnosis can be made.
If you need further help, I’m available over the phone at https://www.6ya.com/expert/gene_9f0ef4df2f9897e7