Ukraine: has border control with neighboring states, citizens and supplies can transit across it. Has billions and billions of dollars in aid from the west, military training, had the largest military in Europe. Russia has offered peace agreements many times but Ukraine either violates them or scuttles talks every time.
Gaza: no border control, no ability to move supplies or people across any border. Does not have military aid from the west, does not have military training from the west, does not have an official military, is not recognized as a sovereign state by the west. Israel has not been willing to even engage in talks in over a decade, Israel also continues to violate international law.
These are the same.