Not sure where in the code this would be done, but it seems there ought to be a check during commander placement that disallows placing the commander on non-traversable terrain (maybe it just uses the same sound when you try to place a building where it can't be placed). When it does happen, the commander becomes stuck and unable to move. On land, it requires a transport to remove or a remake of the game to redo placement. Underwater, the commander is permanently stuck.