You still need to isolate the command causing the problem. In the log again
05:51:04.563 : N14 M530 S1 L1558
05:51:04.563 : N15 M531 Tag New Rnd Ben*15
05:51:04.563 : N16 M117 ETE 24m 59s115
05:51:04.563 : N17 M532 X0 L0*5
05:51:04.579 : N18 M10728
05:51:04.579 : N19 M190 S55*96
05:51:04.579 : N20 M104 S20287
05:51:04.594 : N21 G28*32
05:51:04.594 : ok 14
05:51:04.594 : N22 G1 Z5 F5000*52
05:51:05.438 : Printer reset detected - initalizing
05:51:05.501 : start
is the sequence before the restart. So one of the commands does cause this. So send them manually and see at what command it exactly happens. Bed was not up so it would need to stop at M190 S55 or that even causes it also heating before was good. But I see no further temperatures and M190 reports them automatically, so it could also be M107 or one of the 4 commands before. M107 would also a good guess if fan is set to wrong pin, e.g. reset pin, but pin 7 is the official fan pin as it looks.