Perhaps this is a "hotend idle timeout" function action. If there is no movement for more than 5 minutes and the nozzle is hot, heating is turned off for both the nozzle and the table. You can either disable this option or preheat only the bed. To calibrate the height, the bed needs to be heated, and the nozzle does not need to be heated.