President Trump has struggled to decisively end the war with Iran, even as the global economic toll and number of American casualties have mounted.