President Trump is eager to declare success in Iran and Gaza, but he is struggling to impose his will in either conflict.