So the Democratic leadership's cautious avoidance of collision with Mr. Reagan may be the best strategy for the Democrats. Surely it helps the White House. Mr. Reagan has low-keyed domestic issues, except for defense matters, this fall. His budget defeat earlier this year seemed to close out the activist domestic phase of his presidency. Now foreign affairs and security matters dominate the White House agenda. This is an area where the executive branch, and particularly the man in the Oval Office, can take the lead in a more isolated splendor.

Ironically, both the Democratic leadership and the White House have gotten their own troops upset by muting the partisan strife. On the budget issue, the decision of appropriations committee Democrats to stay closer to the administration's target than to Congress's budget resolution will, it appears, head off a presidential veto. But many liberal Democrats fear the contrast they had hoped to draw between a more open-hearted Democratic party and a miserly Reagan GOP will be erased. More partisan Republicans are similarly upset with their own leadership and the White House. They wanted the Democrats enticed into pushing through bigger appropriations bills so they could have labeled the Democrats ''big spenders.'' The President is offering the Democrats a reasonably good compromise, and if they go along he's signaled he'll sign on.

On Lebanon, the electoral and substantive goals of House Democrats and the White House are again close. In Congress, most members realize the President has few options there. Keeping the marines in place is the least unpalatable, but most members deeply want to preserve a say on the marines' future in Lebanon. That's why they have been so upset by Secretary Shultz's refusal to define narrowly how invoking the War Powers Act would crimp the President's decision-making. Lebanon has provoked a curious coalition of dissent. Conservatives of both parties fear the US has embarked on a no-win course in Lebanon, that could sap energy and morale in the months ahead. Many liberals want to preserve Israel's interest in the Lebanese outcome, backing the marine presence, while others want no part of what they see as a drawn-out civil war.

House Speaker O'Neill has kept a low profile on the marines in Lebanon negotiations. He had to endure a Democratic caucus yesterday questioning his wisdom in backing the Congress-White House pact. And if Congress rebels he could still support a drive for more explicit ties on White House options.

But the fact remains that some of the President's closest allies in recent weeks have been the Democratic Party leadership.

This alliance might not last.

The KAL Flight 7 incident, Lebanon, and arms talks have pushed Central America off the front page. Central America is a harder theater for Mr. Reagan to sell to the US public. Events in Nicaragua, Guatemala, El Salvador could turn attention back to this hemisphere. Also, only four of l3 appropriations bills have gone to the White House for signing. Next month starts the new fiscal year. Congress will have to pass a continuing budget resolution - another potential for conflict - to keep the government operating. Then there's the defense budget , the Clinch River nuclear project, and an immigration bill, for Congress to get its back up on.

But for the moment, Congress and the White House have been avoiding a scrap, to everyone's credit.