> completely vacated the gaza strip of any occupation
What's Gaza? Gaza is just a region of Palestine. Gazans have the full right to fight against the occupier of Palestine. Besides, Gaza was still considered occupied due to the complete control Israel exercised in it (you confuse occupation with colonisation).
> whenever Israel downsized its occupation, it has been attacked by the Palestinians
Israel doesn't need to downsize its occupation. It needs to end it. Whatever consequences it suffers while still occupying land that it doesn't have a right to, are just consequences and it can't complain. How is this not clear?