If that part falters and oil importing countries stop treating oil as their most critical import then the decades long capital inflows would slowly turn to outflows as oil importing countries start hedging their import risks by selling American assets and buying up non american assets instead.
And, a trickle of capital outflows could easily lead to a stampede for the exit.
The US would probably exacerbate the crisis by raising interest rates.
Maybe compare with US tech companies that have lots of overseas earnings. They don't necessarily have a better idea about where to invest the money. It's not like there is a plan to earn money in a certain country to achieve some other goal. It's that making money is good and figuring out what to do with it is a nice problem to have.