Traditionally, they're recorded right after the opening weekend (not always any more - it's true that sometimes it's done sooner, certainly for marketing reasons) - but with Merman or not (lol), the show is often considered "frozen" by that point - rehearsals and previews are over, and what's heard from the singers on the recording is essentially what the audiences are hearing at the same point. (In terms of interpretation, that is, not always obviously in terms of how the score plays in the show context.) If they're not "settled into their characters" by then, we could also say it's a shame they have live audiences at that point, lol.
Though of course, anyone who's at least seen the Pennebaker Company documentary will know that the singing at that point may be far from perfect. ;-)