If the temperature is generally stable then the most likely cause is that at certain points of the print, too much air from the print cooling fan gets directed at the heater block. This most often happens when the cooling fan first gets turned on (typically at the start of the second layer), but could happen later depending on the shape of the print.
Remedies include:
1. Use a silicone sock on the heater block if you are not using one already, and re-tune the heater after fitting it.
2. Make sure the fan is directed at the print, not at the heater block.
3. You may be able to tweak the PID parameters manually to get faster response. First check that with the hot end hot but the head not moving, the temperature is stable. If so, you can try reducing the dead time (D in the M307 command). Try 20%. Reducing D makes the PID respond faster to temperature changes; but if you make it too low then the temperature will oscillate. Test with and without the print cooling fan running. If the temperature shows signs of oscillating, increase D instead.
4. If all else fails, use the M570 T parameter to increase the temperature variation tolerance above the default 15C. OTOH if you get temperature excursions of more than 15C, you are likely to get printing problems.
HTH David