The US isn’t a single consistent entity. US basically enabled modern day China by opening trade, but now that they are catching up it’s no longer advantageous to help them forward.
The US benefited from opening up to China. It returning to the dominant economy in the world was an inevitability with or without US support.
Being on good terms with them and dealing with inflation by using their labor force bought the US some time but US politicians just acted more irresponsibly (warmongering) instead of capitalizing on the temporary windfall.