Probably no one. They both need to come out of this thinking they have won.
The trade deficit is not China's fault. If Americans demand more goods at cheaper prices than they can produce America has to import those goods from somewhere. If they keep demanding, importing and spending (beyond their means) they need more debt to buy those goods.
Yes IP theft is China's fault and therefore needs another plan to address it.
If pushed into a corner with tariff on all imports, China will resort to offloading $1.2trn worth of Treasuries sending US bond yields skyrocketing. China is after all US's biggest creditor.
China won't remain unscathed but Trump cannot be President for more than his term (or 2). Xi is President for life. Xi does not have to worry about public backlash (not yet). Americans can vote Trump out of office.