That’s fair criticism, however, Gaza is independently governed and was not occupied. Hamas is the main reason why true 2 state solution is not possible at the present. Remove Hamas, remove terrorist organization in power in Gaza whose goal is to destroy Israel, then the 2 state solution is reality.
If you try to make Palestine state with Hamas in power, then the moment the borders are opened it will get more and more advanced armament to attack Israel. Why on earth Israel would agree to that?