Politically, President Trump is on his back foot as he prosecutes an unpopular war and seeks to break campaign promises on entitlements.