(BGE) Track To Actuator only works when crossing the track axis
You want to start tracking when the object is created -> activate the TrackToActuator with an AlwaysSensor.

Be aware the ray sensor measures along local axis. This means it turns with the object. The Sensor will only evaluate positive when detecting an object (= must block the ray). In other words tracking starts after seeing an enemy.