The loss of several billion dollars in potential sales of industrial plants to the Soviet Union has touched off a feud in government and business circles here over the wisdom of maintaining Japan's official sanctions against Moscow.

Japan imposed restrictions on trade and diplomatic contacts between the two countries following the Soviet invasion of Afghanistan in December 1979. Since then, the government has come under mounting pressure to lift these restraints from Japan's powerful big business establishment, whose leaders want to see chilly relations with Moscow put back on a more friendly -- and profitable -- basis.

Senior Japanese diplomats have flatly rejected such a move out of concern that it might strain relations with Reagan administration officials commited to tough dealing with the Soviets.

They suggested, however, that sticking to the hard line may become increasingly difficult in the face of political forces favoring improved Soviet ties.

The chill between the two countries set in early last year when, following the Carter administration's lead, Japan put tight limits on the exchange of visits by high-level government officials and on low-interest, government-sponsored credits used by Japanese exporters to finance trade deals with the Soviets. Tokyo further angered the Soviets by boycotting the 1980 Summer Olympics in Moscow.

Since then, Japanese traders have lost sizable Soviet orders on at least 10 major long-term plant projects, each worth more than $100 million, according to industry analysts here.

Many of the contracts, they said, have gone to competitors in Western Europe, particularly France and West Germany. The shift is widely interpreted in Japan as a sign of Moscow's retaliation for Tokyo's close alignment with Washington on the sanctions issue.

Two weeks ago, Moscow turned down Japanese bids for $1.7 billion worth of gas pipeline compressor stations in favor of West German, French and Italian firms, according to Japanese press reports.

The pipeline project is designed to link the Urengoy natural gas field in Western Siberia with the Soviet-Czechoslovak border.

Diplomatic analysts in Tokyo pointed out that Japan's Western European rivals had been favored in the bidding because they will also ultimately figure as major purchasers of the pipeline's output.

But they said that the Soviets, in apparently cutting the Japanese out of the deal entirely, took the opportunity to underscore their dissatisfaction with Tokyo's policy sanctions.

The Japanese chafe over what they view as European nations' open disregard of Western guidelines on trade with the Soviets, which they claim has helped fuel a boom in business with the Eastern Bloc. According to Japanese statistics, two-way trade with the Soviet Union in 1980 grew 58 percent in France, 32 percent in Italy and 11 percent in West Germany; the figure for Japan was 6 percent.

Hirohide Ishida, who heads the Japan-Soviet Parliamentary Friendship Association, a group of conservative members, said, "This is absolute nonsense." The United States, he said, "is selling wheat to the Soviets . . . . It's clear that the sanctions are not effective to settle the Afghan issue."

Such sentiments have been bolstered by the strong support of Japan's Ministry of International Trade and Industry. In briefing foreign reporters here this week, Ministry spokesman Kazuo Wakasugi said, "It's better for us not to try to strangle the Soviet Union . . . . In general, the ministry hopes to promote trade with the Soviet Union and to remain flexible within the overall framework of the Japanese government's international policy."

The bid to improve relations with Moscow, however, suffered a setback last week when Soviet Education Minister Mikhail A. Prokofyev abruptly canceled a scheduled visit at the invitation of Ishida's parliamentary group.-

Prokofyev refused to come when Foreign Ministry officials denied him a regular diplomatic visa, offering what amounts to a special tourist visa instead.