1) Check if the batteries in the pen are inserted correctly with their positive and negative sides positioned in the right place.
2) It may be because of low battery life of the pen. Replace the batteries.
3) The sensor might be located too far from the screen. Refer to the video below and relocate the sensor.