I've seen this a few times and can't see a thread that covers it here. When a commander gets itself in a trench, from the looks of things it happens when an orbital transport misses the intended location, it's very difficult to destroy it. It also can't get out if all transports have been destroyed, so I'm guessing the bug is that it can get in there in the first place. I had this recently on the last match of galactic war. I couldn't get my orbital laser to fire at it, I couldn't get my bombers to fire at it, I didn't have access to artillery. Tanks that were close enough would fire but couldn't get LOS, same for tactical missile launchers constructed within range. I had to transport units into the trench which I could only do by telling it to unload on the side of the trench nearest to the camera, which it would then miss.