TOKYO, Sept 28 (Reuters) - Japanese stocks have been more resilient than many markets this year and their valuations are attractive, with big exporters and global firms reaping big profits from the weak yen, and in normal times this might lure foreign investors to pile in.

But these are not normal times.

As the yen's slide gathered pace, reaching a 24-year low last week and down about 20% so far in 2022, foreigners distanced themselves from Japan stocks, selling 1.5 trillion yen ($10.4 billion) in shares in the June-to-August period.

Analysts and market players say many foreigners, who account for about 70% of trade on Tokyo's main Prime share market, have withdrawn to the sidelines as they sort out often contradictory market trends, including Japan's conflicting actions on the yen, while tending to take their cues from slumping overseas markets.

And this, they say, is keeping Japan's share benchmark stuck in a range, resisting tailwinds that could be sending it higher.

"Japanese companies' earnings are growing while those of other countries are falling. Overall, Japanese shares' valuations are low," said Takeshi Fukushima, chief investment officer at BlackRock Japan.

"Japanese share fundamentals are solid but they are falling on overseas elements."

Toyota Motor, one of Japan's biggest exporters and a big beneficiary of the weak yen, has lost about 5.6% of its value this year, outperforming the nearly 40% slide in U.S. peer General Motors.

Japan's benchmark Nikkei 225 is down 7.7% this year, compared with a 19.4% drop in the Dow Jones Industial Average and a 26% decline in world stocks.

"The weak yen is obviously positive for exporters and that is why Japanese shares are outperforming overseas peers," said Norihiro Fujito, chief investment strategist, Mitsubishi UFJ Morgan Stanley Securities.

But the Nikkei has held to a relatively narrow range of about 26,000 to 29,000 for the last six months while valuations still lag, at 12.11 times earnings for the next 12 months, in yen terms, compared with 17.23 times for components of the Dow.

While domestic investors have helped to keep the market buoyant as foreigners departed, buying a net 1.7 trillion yen in shares in the June-to-August period, analysts and investors expect that uncertainty around the yen's weakness, and the U.S.-Japan yield gap that has driven it, will keep foreigners wary.

"Japanese stocks have uncertainties going forward because the outlook of the yen is not clear," said Takamasa Ikeda, senior portfolio manager at GCI Asset Management.

Japanese authorities sent sharply contradictory signals on the yen late last week, both intervening in the foreign exchange market to prop up the currency and doubling down on the ultra-low interest rates pushing it lower.

The yen weakened past 145 per dollar after last week's diverging U.S. and Japanese rate decisions widened the yield gap, although the currency stabilised after Japan's intervention.

In Tuesday Asian trade, the yen was around 144.5 per dollar.

Ikeda expects the market focus on U.S. yields and monetary policies, especially after the U.S. Fed last week signalled a hardline stance against inflation, will mean Japanese shares largely take their cues from overseas markets.

The Nikkei's performance in dollar terms, monitored by many foreign investors, has tended to mimic its main overseas counterparts, falling 26.6% so far this year.

BlackRock's Fukushima was optimistic, however, that Japanese shares will attract more positive interest when overseas markets are less of a drag, and given their favourable fundamentals beyond the weak yen.

"They have upside because costs for materials and oil have been falling and the local economy is reopening," he said.

"We can be hopeful of the outlook for Japanese shares when overseas markets are settled down." ($1 = 143.7000 yen)

(Reporting by Junko Fujita; Editing by Vidya Ranganathan and Edmund Klamann)