As Republicans face down tough midterm elections, President Trump has appeared out of step with the party on Iran, the economy and other issues.