I personally don't think the American government should back Palestine, and would be happy to see them just also not back the occupation.
That said I happen to back Palestine because it's a clear cut case of a native people fighting against an occupying entity that invaded their land. There's no long term back and forth here. A group of Europeans came from abroad, set up shop, and immediately set out to displace and remove the native population.The just solution would be for the invading regime to stand down, or be made to stand down, and for the Palestinian people to get their rights to their land, right of return, and everything else that comes with sovereignty. My expectation would be that they would work with those who abide by the laws of their new system, contrary to what a lot of western propaganda would otherwise suggest, especially given the long history of Jewish leadership in Palestine prior to the occupation, though it will likely be a bit dicey at the start, given the sheer volume of belligerents. Handling it as a law enforcement operation at large scale would be what would make the most sense, though, again, for them to decide.
Ukraine, on the other hand, has been in flux for centuries, and most recently heated up starting with the Orange Revolution and Maidan revolution, sponsored and assisted by the intelligence services of the UK and US. At this point, it's for Russia and Ukraine to figure out and for the US to step back from entirely -- we've done more than enough to make things worse, and frankly, I don't particularly care where the lines end up drawn on that one. States in general bother me but it's for the local population to determine what their government will be.