In the summer of 1704 some of the local commanders and officials in the Baltic provinces, most notably Major General Schlippenbach and Governor General Frölich, pleaded with Major General Lewenhaupt to move his forces from Courland and join in an effort to relieve Dorpat or Narva. Lewenhaupt firmly refused, stating that he could not possibly convince Hetman Sapieha to join such an enterprise and the it was quite out of the question to leave the Lithuanian forces on their own as the enemy would then soon threaten the fortresses in Courland as well as Riga. It was also important to convince more Lithuanians to join the Warsaw Confederacy and this would be quite impossible if Lewenhaupt's army left the area. The General also pointed out the weakness of his force and the difficulty of supplying the troops during the march.
I think it's quite obvious that Lewenhaupt interpreted the King's wishes correctly. The most pressing matter in 1704 was, in Charles XII's opinion, to assist in rallying Poland and Lithuania against Augustus II. This does not mean that he took the fate of Narva and Dorpat lightly - he had during late 1703 and early 1704 repeatedly urged both the government in Stockholm and Governor General de la Gardie in Estonia to support Narva and was quite upset when little was done. However, I believe it is quite obvious that Charles in 1701-1702 had made a choice and that was to pursue the war with Augustus to a successful conclusion, i.e. to have him replaced by a new King (who had to be a native Pole). In order to reach this goal Charles was fully prepared to temporally sacrifice parts of the Baltic provinces, so that he in the end would be able to concentrate all available forces against one remaining enemy.
This is also, in my opinion, where critics of his Polish policy often err. Their conclusion is generally that Charles underestimated the Russian threat and marched into Poland believing that the forces he left in Ingria, Livonia and Courland would be able to protect the provinces. I think that's unlikely as the first heavy Russian attacks came as early as in September 1701 and Schlippenbach's army suffered its first big defeat in late December the same year. At that time the main army was not further away than Courland and it would still have been entirely possible to cut short the involvement in the Lithuanian civil war and return north. But the decision had already been made. Once it had, it was imperative to have the bulk of the reinforcements go to the King's own army rather than to Ingria or Livonia.