Sometimes the voice actors do have to go back and do some post-sync dubbing (ADR).
I just happened across this bit of behind-the-scenes commentary from the creator of Phineas and Ferb who also voiced Doofenshmirtz, talking about having to do a bit of ADR to compensate for an animation mistake.
Upon rewatch of that I realized apparently they planned to do ADR for the entire production, not just here and there.
Fleischer Studios actually did it the opposite way. They animated the films then recorded the dialog later. This is why Popeye would mutter under his breath in the old black and white Popeye cartoons.
In addition to the story boards for the prerecorded cartoons, the animators would also create cue sheets that were timed to the frame (usually doubled so 12 frames a second), almost like sheet music. Actions and dialog are written out and the timing recorded, so they know exactly when an action or lip sync occurs.
I always loved Popeye’s weird asides where the lips didn’t match the words in the oldest of the Fleischer cartoons. But I think you’re wrong about Fleischer studios always doing this. In Gulliver’s Travel’s, for instance, Gulliver’s closely rotoscoped motion would have betrayed any variations from recording – they pretty clearly recorded both motion and dialogue simultaneously.
They changed to recording first when they moved production from New York to Florida, during the production of that movie. The early Popeyes and Betty Boop cartoons were animated first but later ones were recorded first. They kept the ad lib quality, though.
There’s a To Tell the Truth episode with Jack Mercer where he even mentions they animate first then record later. Well, ironically, it was the fake Jack Mercer that answered that, but he was right in all his answers (like how he was hired. He didn’t get to go into it, but he was an inbetween artist and would imitate the first voice of Popeye Bill Costello to make the other animators laugh. When they fired Bill, they hired him and he did it the next 40 years or so.)