Israel won the diplomatic battle because it understood the correlation of its strategic interests with those of the Sunni regimes. It lost the military battle of attrition because it permitted Hamas to resupply
The State Comptroller's report on Operation Protective Edge, Israel's war with Hamas in the summer of 2014 is exceedingly detailed. The problem is that it addresses the wrong details.
Israel's problem with Hamas wasn't its tactics for destroying Hamas's attack tunnels. Israel faced two separate challenges in its war with Hamas that summer. The first had to do with the regional and global context of the war. The second had to do with its understanding of its enemy on the ground.
War between Hamas and Israel took place as the Sunni Arab world was steeped a two-pronged existential struggle. On the one hand, Sunni regimes fought jihadist groups that emerged from the Muslim Brotherhood movement. On the other they fought against Iran and its proxies in a bid to block Iran's moves towards regional hegemony.