Is this a case of suspended disbelief, however nitpicky it is, or are there logical reasons?
This is a case of suspended disbelief for fiction; because audiences are not moved, emotionally, by the destruction of hardware. They will get bored if both sides use hardware and the result is just a circus of mechanical destruction.
If we use robots and the enemy is living beings, we look like exterminators at best if they are insectoid or non-human enough, and like the bad guys if the enemy has any human characteristics, emotions or demonstrates feeling pain or grief. The only way to make the audience identify with our side is to put human lives on the line.
Star Wars cannot be about machines going after each other, we need human or human-like pain, grief, suffering and despair, and it must be severe: Luke loses his adoptive parents. Young soldiers with lovers back home, hopeful to start their lives together after the war, are trapped and slaughtered. As Stephen King advises writers: Develop a character the readers will love and care for, then put her in the cooker.
In futuristic fiction, in order for us to identify with robots, they would have to be, effectively, human beings with an emotional side able to experience setbacks and frustration and some kind of suffering, perhaps vindictiveness and anger as well.
Of course that is not where the question lies: IRL, it is fair to presume that within 50 years or so, robots will be able to do anything a human can do in warfare, better. The "steal command" problem is a non-problem, we can use the same protocols for robots that keep our banking system humming along transferring trillions of dollars around the world without anybody diverting all the money into their own accounts. Long key RSA encryption is easy, fast, and impossible to break by any known means; that is what banks use.
The robots in question may be about as self-aware as a self-driving car (which requires a form of self-awareness to navigate its body safely through a fast moving maze, which also requires a self-referential model of what movements it is capable of choosing and how other vehicles will most likely move).
The robots do not have to be emotional in any way, they can be rational and intelligent (in the sense of accurately predicting outcomes in novel scenarios). Emotions, like fear of death or reluctance to inflict harm or psychological angst over what they have done, or grief over lost compatriots or anything else are all baggage they don't need. Intelligent machines do what they are told; including if they are told to stop, self-destruct, or conduct a suicide mission that will destroy them: They can be "intelligent" with absolutely zero emotions or "desire to live" that would interfere with or override their commands.
As for whether the enemy uses live soldiers: The story of the war is written by the victors, remember? Just as we do now in the USA, we use robots and high tech and drones, but we don't spin that as cowardice: We spin it as saving the lives of our soldiers, protecting the troops, while destroying the bad guys. We say our soldiers are still brave, intrepid warriors, even if they sit all day in a comfy chair a desk safely tucked away in a stateside office building on some Army base in South Dakota, using a 4-screen video-game interface to fly drones over Pakistan.
Robots will be just as autonomous and capable of making decisions as humans; should communication be disrupted. They will be just as capable as humans if cut off from command for any reason; but more capable than humans of communications between each other (e.g. they can pass full video of what they see and hear, they don't have to 'describe it'; they can have a group mind).
They will also be able to survive better than humans. They don't have to rest, they can use solar power to recharge; if necessary they can hide and shut down all but the most minimal solar powered sensory activity, and survive indefinitely without food, waste, or boredom (boredom is an emotion).
This is not something current AI can do; but the outlines of what it will be able to do in the next 30 to 50 years are clear. Just as Moore's Law was clear and has held, with only slight modifications, for 50 years.
Today's robotics are like early guns; used in warfare and deadly, but not terribly accurate or reliable. That will change, they will get better, and no politics or shame will stop them, just as our modern automatic guns feel light years ahead of the blunderbuss which was basically a mini cannon, future robots will be far better and more lethal than human soldiers, and the citizens of the countries that own such robots will be appalled at the idea of losing their human soldiers in battle. They won't be hacked, even by up-close surgery. John Conner will not have the 10,000 bit encryption code necessary, and no screwdriver is going to be able to modify the circuitry of integrated circuits: They will have one-way tamper-proof casings anyway, so once they are sealed any attempt to open them destroys them (there is no need to ever get inside and repair them, even now we just replace malfunctioning chips). (Heck our robot can automatically self-destruct its processors if anything every penetrates its casing).
In fiction the audience wants to identify with entities in the story that display human emotions and qualities. In real life, and real war, the objective is to subjugate the enemy and force a surrender under threat of death to the humans on the other side. IRL we'd rather not identify with the soldiers we lost, we don't want to share the grief of their families, parents and children and spouses, we don't want to feel the loss of their potential as good people, friends, and citizens. We don't want them to suffer from PTSD or the trauma of war. If we can pay our way out of all those emotions, by dint of buying robots to do the dirty work, we will.
Further, in my opinion, we (and our military leaders) will prefer our robots to be distinctly non-humanoid (or even animal) in form and behavior, so as not to accidentally invoke any empathy or sympathy for the robots. A drone doesn't look like a person, a drone getting shot down or crashing doesn't look painful, it looks like an unfortunate loss of hardware, like accidentally dropping a big screen TV down a flight of stairs. A kind of "dammit" for the loss of value, but zero concern for any pain the TV felt; it didn't feel anything. If the animal form with legs and limbs is truly useful for navigating terrain; I suspect we will use insect or arachnid forms with many legs. Losing a robotic soldier reminiscent of a tank-like 3-foot cockroach or spider won't bother us much at all. Sure, it is our cockroach-tank, but if it gets blown to pieces by a missile, no problem. Send two this time.