Nope, Israel is an occupying power and as such has the following responsibilities in Gaza
As an occupying power in the Gaza Strip, Israel is obligated under international humanitarian law—specifically the Fourth Geneva Convention and Hague Regulations—to ensure the safety, welfare, and basic needs of the civilian population, including providing food, medical supplies, and maintaining public order. Israel must permit humanitarian relief, protect medical facilities, and is prohibited from using collective punishment, starvation as a weapon, or forcibly transferring civilians
The claim you make only stands if Palestine is free but it isn't and doesn't look like it is likely to be. So yes Israel is breaking international law by denying basic humanitarian needs. You can't have it both ways.