Hilda doesn't actually like Dimitri in Azure Moon nor is she a big Church defender, she only comes with because of Byleth and she says as much. She doesn't go with Edelgard because Hilda has a bigger distaste of Edelgard than her like for Byleth, simple as that.
Also in Hopes, there is no Byleth-equivalent to lead her away from the Church and her strongest relationship in the game is with Claude to the point that she's his his implied love interest in Hopes and as a result would never betray him.