Sure, it does: net inbound capital flow is necessarily equivalent to trade deficit, so increasing net investment from US to China necessarily reduces the US-China trade deficit (or, increases the China-US one if you do enough of it.)
This is also why trade policy may not be the most effective mechanism to addressing as trade deficit (if you even need to address it, which is a different debate.) Instead, just address the pattern of domestic investment: the more domestic investment opportunity is taken by domestic investors, the lower the capital inflow and the lower the trade deficit.
And there is no guarantee with free capital flow you will get net inflow into China. If anything there was an even larger outflow before China tightened up the control. And even if you managed a net inflow into China, there is no guarantee it will reduce the bilateral trade imbalance with US per se, so long as the demand for US assets is not reduced.
Of course if you meant that US could impose capital control to make trade deficit go away, I would agree.
Let me give an example: If Tesla builds a factory in Shanghai, even if it does not import these cars back into the US, it can substitute the current export of US-made cars into Asia and thereby reduce US exports and increase US trade deficits.