The anticipation of a Soviet withdrawal from Afghanistan has yet to come to a full focus on the regional and strategic aspects of such a move, which on current evidence may rate as one of the major global frustrations the Kremlin has suffered since World War II.

The American government isn't (so far) gloating, and the Kremlin is not advertising its embarrassment. But a withdrawal from Afghanistan, along with other developments in and around the Persian Gulf, could transform a situation that a decade ago was a disaster area for the United States.

At that time, the shah of Iran, a chosen ''pillar'' of American policy, had fallen, and the Soviet invasion of Afghanistan had thrown a menacing shadow across a region long regarded as sheltering under a Western umbrella. An American administration little prepared for this range of surprises found itself desperately playing catch-up.

That process has been continued vigorously by the Reagan administration, and the results are plain. Moscow, saying its troops are departing Afghanistan, is forsaking use of Afghan territory for further projections of Soviet power, and is leaving in the region a profound impression of its cruelty to a Moslem people. Further, Moscow now labors under the considerable burden of the American and other countermoves that its policy and new developments provoked.

The United States has moved into a new phase of bipartisan strategic wariness, doubled defense spending and launched a 600-ship Navy and arranged in Oman and elsewhere around the Indian Ocean for the billion-dollar array of runways, harbors and weapons stockpiles that let it project its own power into the region as never before.

Meanwhile, the Kremlin took one of those steps that look small and neat at the time but later come to loom as large and costly. The step was to one-up the then-foundering Americans with an offer to escort Kuwaiti tankers. This Soviet gambit, plus the need felt by Washington to compensate for revelation of the arms sales to Iran, triggered the American reflagging operation, which reassured the Arabs, brought in the European allies on a parallel track and surely contributed to the evolving Soviet readiness to cooperate with the United States in diplomatic approaches to the Iran-Iraq war.

In turn these developments stilled most of the public misgivings in this country about the reflagging. The vehicle for these jitters is the argument over commitment of American forces under the War Powers Act, and that vehicle seems currently to be parked. Since in the post-Vietnam age the showing of the flag that counts is by Congress, not just by the U.S. Navy, this has to be put down as a major strategic consequence.

Pause for a moment and look about: the United States is experiencing some friction and outright slippage in its negotiations for continued base rights in Spain, the Philippines and other traditional places. The Soviet Union picked up some big base chips in Vietnam in the 1970s. But the military access that Washington has gained in Third World places in and about the Gulf is very substantial, the more so, one can argue, as it is of the loose and low-visibility sort more suitable to local political circumstances than formal base rights would be.

But there need be no premature rejoicing over a result which, had the Soviet-American positions been reversed, might have left many Americans gasping about a new strategic threat. If there is any law at work, it is the law of unintended consequences. Some of our strategists may draw comfort from looking at the changing colors on a map, but other considerations enter in.

Afghanistan remains occupied, and post-withdrawal arrangements are uncharted. The American fleet operating in the Gulf has so far performed its mission, but the mission is limited to protecting 11 Kuwaiti ships, and general shipping in the Gulf remains at risk. The Iran-Iraq war continues.

The full political costs of that new American presence, in risks that may yet arise and in obligations that the United States may be asked to meet, are, at best, unexamined.

Finally, to imagine that a great power would simply accept the other's strong new surge in a major region on its very doorstep is shortsighted. The strategists have plenty left to think about.