Doubts about the future of President Trump's agenda have put Wall Street on the defensive.

Investors have yanked $8.9 billion from U.S. stock funds during the week that ended March 22, according to research firm EPFR Global. That's the biggest retreat since last June.

Some of the hardest-hit stocks were the ones that soared after the election. Investors pulled money from banks, manufacturers and small-cap stocks, which have the most exposure to the fluctuations of the American economy.

At the same time, the Dow has backed away from all-time highs, losing 250 points this week. The index is on track for its worst weekly performance since the week before Trump's victory.

Analysts point the finger at Republicans' struggles to pass a bill repeal and replace Obamacare. Investors fear that a failure on health care could delay or even derail Trump's promise of "massive" tax cuts -- a pledge that has underpinned the rally on Wall Street.

"The Trump trade was always going to have a 'where's the beef' moment," Bank of America Merrill Lynch strategists wrote in a report to clients.

BofA said failure to pass the health care bill is "unlikely to cause a 'TARP moment,'" referring to the 9% crash in the S&P 500 after Congress initially rejected the Wall Street bailout package in September 2008.

Related: Wall Street is losing faith in the Trump agenda

Still, BofA said health care failure could cause a "credibility hit" that "temporarily" pushes stocks and Treasury yields lower.

EPFR said the exodus from U.S. stocks is a sign that investors have taken a "turn towards the defensive" as they question whether the Trump administration "has the necessary focus and political skills to get its economic agenda through Congress."

For instance, investors yanked $1.1 billion from small-cap stocks last week, the most in six months, according to EPFR. Small-cap stocks are typically based in the United States, and investors had hoped Trump's America First agenda and promise of 4% economic growth would juice profits. But the Russell 2000, which measures small-cap stocks, has started to struggle and lost 2% of its value this week.

Likewise, industrial stocks, a group expected to benefit from Trump's focus on trade, suffered their biggest outflows since mid-January.

Banks were another big winner after the election amid hopes of higher interest rates, which allow banks to make more money, and less regulation. But investors withdrew $600 million from financial stocks in the last week.

Related: Enough about Trump! Markets tired of politics

So where are investors putting their money instead?

Emerging markets and bonds benefited from the U.S. uncertainty, with both enjoying significant inflows in the past week.

Gold, which tends to do well during times of investor fear, is also going back into style. Investors poured $1.1 billion into gold funds in the last week.

Looking ahead, the key for Wall Street will be whether it looks like Trump and Republican leaders can quickly pivot from health care to tax reform.

Treasury Secretary Steven Mnuchin on Friday promised that Trump's new tax reform plan is coming "very soon." He expressed confidence that tax reform will happen this year, if not by August as he originally predicted then definitely by the fall.

But tax reform won't be an easy deal, either.

The Trump rally is "dependent upon the delivery of tax reform," David Kotok, chairman and chief investment officer of Cumberland Advisors, wrote in a note to clients.

"The longer that process takes and the more questionable the outcome, the higher the risk to stock prices," Kotok wrote.