The US president joined Western leaders around the world urging Israel to end the war after the death of Hamas leader Yahya Sinwar.