I would think it all depends on the situation since your question is a bit vague. For example, Chris Farley was supposed to be the original voice of Shrek but died before he completed recording. As a result, Mike Myers was brought in to replace him and all of Farley's lines were thrown out. For recurring characters, the studio would almost certainly be able to find a replacement voice actor. It would probably go by the same principle for when they can't get the same voice actor to do their character again (i.e., Robin Williams refusing to do Genie for Aladdin 2 and for the TV series, so Dan Castellaneta was hired to replace him).