That’s a complete misrepresentation of the facts.
Hamas was willing to return hostages if israel freed all thousands of Palestinians prisoners, including those captured in Israel while committing the Oct 7 massacre.
And that is exactly what sinwar wanted to achieve in every one of his wars, just like when in 2014 Israel traded 1 captured Israeli soldier for 1000 Palestinians prisoners.
So basically Hamas wanted israel to surrender, accept Hamas terms, and ignore Oct 7.