Hello. This could be caused by a faulty cylinder head temperature sensor. The system is designed to cut engine power if it detects it is overheating.
If the engine is not losing coolant or not actually overheating points to a faulty sensor.
However, if the engine is overheating then the sensor is doing its job and the cause of the overheating will need to be found.