Caveat: It's possible that Israel isn't the single factor behind the US withdrawal. (Though, until time tells feel free to draw your own conclusions).
There's no reason to assume that Israel was the only influence behind the US decision.
There's no reason to assume that Trump wasn't looking for a way out regardless.
There's no reason to assume that the Mattis resignation was exclusively over this.