Do the different animations in the alternate costumes affect hurtboxes?
Solution 1:
Agreeing with senpai, alternate costumes and associated different animations do not change the hurtboxes (and hitboxes) for the characters. However, I want to back this statement with a quote from the Smash Wiki page.
Pikachu, Pokémon Trainer, Villager, Wii Fit Trainer, Robin, Corrin, Inkling, and Byleth all have male and female variants; and Olimar and Bowser Jr. have model swaps that change them into different characters with different names, complete with corresponding voice and Announcer clips, though like all other alternate costumes, they bear no gameplay differences.
And also this previous Arqade answer, which states that it is mechanically impossible for alternate costumes to have different hurtboxes (and hitboxes).
Solution 2:
Wouldn't that mean that their hurtboxes behave differently in their idle animation? Is there an actual theoretical/practical gameplay difference (however minor) between alternate costumes?
This is correct. Odd-costumed Byleth uses idle animations 1 and 2, while even-costumed Byleth uses idle animations 3 and 4, and they are sufficiently different that even though their hurtboxes are the same, there is a minor gameplay difference. (Note that they do use the same "base pose", so they both return to the same shape after executing other actions, before the idle animations start.)