During WWII, the entire Allied leadership was willing to kill millions of Axis children if that's what it took to win the war and force the enemy to surrender unconditionally. There was at least some genocidal intent. Population centers were intentionally bombed to wipe out civilian factory workers. We can argue about whether that was right or wrong but the reality is that it's probably inevitable once armed conflicts involving nation states escalate to an existential level.

“Before we’re through with them, the Japanese language will be spoken only in hell.”

-- Admiral William F. "Bull" Halsey Jr., 1941

It was wrong, and yes would likely be seen as genocidal in the current day, rightly so. You can't just randomly kill innocent civilians, no matter what. It didn't even meaningfully accelerate the end of the war.

Was it wrong though? How many US troops should we sacrifice to save one enemy civilian? In other words, if you were President Roosevelt or Truman then how do you morally justify not doing everything possible to shorten the war by even one day? How do you tell a US family that their son had to die so that the US government could avoid randomly killing innocent civilians?

It's cheap and easy to pretend to be morally superior when you're not the one forced to make hard choices based on limited information, and then deal with the consequences.