An explosion in southern Gaza’s Rafah killed and injured Israeli soldiers after it caused a building to collapse.