Andrei is perceived in the opposite way. He is not loyal; he wavers, and he became a traitor not just ideologically, but actively, by joining the enemy's army. If he had simply helped his Polish girl, saved her from hunger, or done whatever else he was doing – that wouldn't be shameful; on the contrary, it would be completely right and worthy. But because of his momentary feelings and moods, he directly goes to war against those who love him, albeit in a very peculiar and specific way... This is a vile act.
In short, both are despicable. You can only sympathize with the unfortunate people who suffer from this war but do not participate in it.