Usage patterns
〈人〉の代役を務めるto serve as a stand-in for someone
He served as the understudy for the leading actress.
代役を立てるto bring in a substitute
Due to a sudden illness, they had to bring in a substitute.
代役に選ばれるto be chosen as the substitute
She was chosen as the understudy for the lead role.
〈人〉の代役を探すto look for a substitute for someone
The director is looking for a substitute for the actor.