That said, the main issue is that Israel has never accepted the assertion that the green line constitutes an international border, because the agreement signed by both parties is explicit that it does not.
In other words, neither side relinquished their claim to territory on the other side of the line. The international community gradually settled on the idea of it being a border independently of the parties actually involved, although the American and British drafters of UN Security Council Resolution 242 insisted on a deliberately ambiguous wording that would not legally define the green line as a border.
Settlements across the green line are considered illegal by the international community, but Israel rejects this on the grounds that if the green line does not constitute an international border, the establishment of a town on one side cannot be any more or less legal than on the other. There were of course Jewish towns and neighborhoods on the other side prior to the ethnic cleansing of the West Bank that took place during the 1948 war – the Jewish Quarter in the Old City, the kibbutzim in the Etzion Bloc, Atarot and Neve Ya'akov north of Jerusalem, etc. These previously Jewish areas were the first to be resettled after 1967. The first “settlers” were the legal owners of property in the West Bank prior to the war, or their descendants.
While there are some areas of the West Bank that no Israeli government would have ever considered ceding, such as the Jewish Quarter of Jerusalem, and the strategic high ground overlooking Israel’s main population centers on the coastal plane, the mainstream Israel view for decades was that the bulk of the West Bank would be relinquished in a land for peace deal. For this reason, Jewish expansion in the main settlement blocs near the green line was condoned and/or encouraged by successive governments in an effort to solidify Israeli claims to those areas, while new settlements in the middle of West Bank were considered illegal by most Israeli governments.
As Israel has shifted to the right on the conflict, due to demographic trends and gradual acceptance that there will be no peace with the Palestinians in the foreseeable future, the mainstream Israeli view regarding the West Bank has become more hardline. Most Israelis have trouble seeing a future Palestinian state as turning out any different than Gaza did after Israel’s withdrawal, so even though most Israelis don’t care much about the West Bank and wouldn’t live there, they are indifferent to settlement expansion, because they believe that Israel will have to maintain control of Area C of the West Bank indefinitely, for security reasons. That doesn’t, however, mean that Israelis support the behavior of extremist settlers. For example, most Israelis view Ben Gvir with contempt, see him and his type as a liability and unfit for government.
Personally, I think it would be better for Israel internationally if they had a better-defined position regarding the West Bank, which included which areas of the West Bank they are claiming and why, but this won’t happen for internal political reasons. It’s generally safe to assume though, that the last offer that the Palestinians rejected is pretty much the best they can hope to get. Since that’s not nearly acceptable to them, they’re likely going to end up with nothing more than what they have now – civil autonomy in Areas A and B, with security autonomy in Area A.
Gaza is a bit different. There isn’t much of an ideological attachment to it, because it wasn’t part of the heartland of historical Israel and Judah, and it’s not geographically in a position to threaten Israel’s main population centers to the same extent that the West Bank is. Plus, unlike Area C of the West Bank, annexation would be a demographic threat. That said, Israel will likely maintain security control of the Philadelphi Corridor and a one kilometer wide buffer zone around the entire territory to prevent the smuggling of materials for making rockets and to protect the border communities from another October 7th type incursion.