How to handle reviewer who is unhappy their recommendation wasn't followed?
In general, any self-respecting journal would not allow a paper to get published if one of the reviewers has significant concerns about its scientific validity, assuming that reviewer’s competence is not in question.
In the situation you are describing, the journal would have to completely re-examine the decision to accept the paper. This would likely mean appointing a new editor to oversee it and sending it out to additional reviewers, and maybe holding an investigation into the earlier decision-making that led to the decision to accept the paper. If the decision turned out to be erroneous, the journal would issue a retraction.
Of course, if the journal really had those kinds of high standards and leve of integrity that I’m imagining would lead it to act in such a way, this unusual situation would almost certainly not have arisen in the first place. So I think asking “what should the journal do” is a bit moot, since a good journal would not need this sort of advice to begin with, and a bad/predatory journal would not be likely to heed it even if it were offered.