The barrier that Israel is building is not a panacea that will enable Israel to withdraw behind it and forget the Palestinians. The barrier may be effective to a large degree in preventing infiltration, but it cannot prevent the firing of rockets and missiles over it.
The security barrier is widely trumpeted as stopping "90% of attacks," but this is an obvious fallacy. It has only been shown to shift 90% of the attacks to the great majority of the area where there is no barrier. That's like saying that the "Minutemen" on the US-Mexico border have been
proven effective at stopping Mexican infiltration. They simply cross where the Minutemen aren't. Perhaps the security fence will be helpful once completed, but a partial barrier is not analagous to a whole.
In order for the barrier to be truly effective, it must be defended from both sides. Israel's success in thwarting the majority of terrorist attacks is due, in large part, to its ability to conduct operations in Palestinian cities and villages.
Withdrawing from the West Bank, as it has done in Gaza, will provide the Palestinians with safe havens from which to conduct terrorism against Israel. Israelis very much want to disentangle themselves from the Palestinians, but will the Palestinians let them?