The IDF freed the hostages from their captors with very few casualties (some of the captors died, obviously). However, they still had to leave Gaza.
Almost all the deaths occurred once Hamas tried to attack the liberators as they were trying to escape--in a heavily civilian area, mind you.
The only reason it was a massacre--and yes, it was a massacre--was because Hamas forced the issue. The only choices at that point were die and fail, or commit a massacre. It is grotesque to sacrifice any civilians this way, but tenfold so when you are the one who is supposed to be protecting them.
If any action gave credence to the Israeli claim that Hamas' goal is to get as many Palestinians killed as possible in order to use it as propaganda against Israel (instead of everyone blaming the culprit most empowered to avoid the deaths: Hamas), your post and this action would rank at the very top.