Dedue and Petra are very interesting because they have the weight of nations on their shoulders too, but have a lot of their options much more limited compared to the other three characters who fit that profile. Now, it would be tasteless to talk about this without addressing that both of them are non-white and the tendency of stories to depict people of darker skin in subordinate positions. The racism of the writers, implicit or overt, are certainly a factor here in their decision making. At the same time, the tragedy of both of their positions are highlighted and the weight of their responsibilities are remarked multiple times. It would be just as tasteless to say that there is no substance present just because the writers fumbled bits and pieces of their construction.
Anyway, back to the point. There is a cruel juxtaposition between being the one person everyone expects to save the world, and being stuck in a world that systemically denies one power and privilege. Petra and Dedue are climbing the same mountain, but with half of the safety equipment, so they constantly have to make compromises or play it safe instead of playing fast. Obligation and power is a constant theme amongst a lot of the characters, to be fair, but in Petra and Dedue the restraints placed on both of them makes it feel so much more like obligation. Courting and working around power than wielding it, but not lacking in agency. It is actually on that front that we can spot some key differences between them.
Dedue believes a lot in loyalty, and not in the principle of it but in the power of it. While I do not disagree with critiques of his paralogue, the core point of it is that Dedue is saved by the people he himself saved earlier in the paralogue. The solidarity between the people of Duscur is what saves Dedue, and it is something he wants to foster to rebuild his nation. It guides a lot of Dedue's actions and goals. Dedue swore an oath to Dimitri, and he expects Dimitri's oaths sworn to him to be held in turn. I think Dedue has both a cynical and idealistic view of honour, arguably more holistic than anyone in Faerghus, as both a system of managing power and a system of political integrity. Where some people might see a hidebound fool, Dedue strives to be a rock that everyone can lean on, because his people need a foundation to rebuild their country on. There is a very horizontal method in how Dedue wishes to lead, and there is a lot of strength in that even if it limits Dedue's options. Dedue has stuck his claim with Faerghus and his principles and beliefs mean he is bound to the ship whether it makes to shore or sinks.
Petra is a lot more mercenary in her approach, and I say that as sympathetically as possible. Petra is a princess, it marks her as a leader of her people who is inherently owed loyalty in a way Dedue is not, but Brigid is an ocean away while Duscur is part of the continent. Petra cannot find solidarity amongst her people the way Dedue can because she is deliberately seperated from them. Indeed, one might argue that both of them are beholden to realism, that their perspectives are ultimately at the mercy to geography than their own ideals. Petra has to make her stand alone, and being alone she cannot stick herself to one place. Hence, unlike Dedue, Petra can be recruited into any house on the simple grounds of "they seem like the winning side." It may seem flighty, but it is pure survivalism that is necessary to make it through hostile territory when one is isolated from all allies.
The divergence can even be seen in their character classes and gameplay traits. Dedue is an armoured unit, slow and hard to manuever, but tough and dependable. Dedue is the immovable object made manifest. So of course Dedue does not abandon his position, even if it would be safer to, he is literally not designed to yield. Petra is a speedy assassin, fragile if caught flat-footed, but frighteningly mobile and able to single out and eliminate any target. Petra is the unstoppable force in the flesh. Of course Petra is willing and able to move from supporting one side to the next, in her position staying in the same place for too long is death.
I was late in voting for Petra and Dedue in some recent character polls, so I needed to type out some hype propaganda for the both of them to make up for it. They are really cool.