DIAGNOSIS That's a classic symptom of a failing main control board. The board has a memory circuit that retains the clock and settings, and when components on it start to go, it loses power intermittently, causing the reset. It's not a problem with your house power if other appliances are fine.
FIX The fix is replacing the user interface/main control board. For the JB645, this is the board behind the console with all the buttons. Unplug the range. Remove the screws securing the back panel of the console. Carefully note the wiring harness connections (take a phone picture). Disconnect them and remove the old board. Install the new one (part number varies, but WB27X10978 is a common main board for this family), reconnect everything, plug in, and reprogram the clock.
IF THAT DIDN'T WORK A very rare alternative is a loose or faulty wiring connection between the board and the power supply, but 99% of the time it's the board itself.
HEADS UP When you order a replacement board, you'll need your full model number from the tag on the frame inside the oven door or drawer. There are subtle variations between model suffixes.