While the president has stood strongly behind Israel since Hamas attacked, he said on “60 Minutes” that a new occupation of Gaza would “be a big mistake.”
Insinuating that because America occupied Afghanistan they don't have the right to make statements about Israel occupying Gaza is absurd.
Frankly, Gaza is already an open air prison. They can't leave, the don't have real autonomy, their food, water, electricity, and health are all effectively controlled by Israel.
I didn't see the interview, so I'm basing this on just the quotes from the linked article, but Biden stopped very short of criticism and appeared to becoming from a strategic "it's a bad plan, do it differently" perspective rather than a moral high-ground perspective.
Which is consistent with US foreign policy, even if I think it's casually glossing over some atrocities in a way I find truly revolting.