I wish this were true all the time. But unfortunately, in far too many workplaces, the harasser gets transferred somewhere else in the organization, or they get a warning that they ignore, or the allegation is downplayed or ignored because "s/he says they never did that" or some other procedural reason. And in some places, if the harasser does get fired, if they apply for other jobs, the employer that fired them might not tell another organization why the harasser no longer works for them.
https://hbr.org/2018/03/if-you-fire...at-do-you-say-if-youre-called-for-a-reference
And if the harasser happens to be the boss or the owner, they can get away with harassment for as long as no one is willing to blow the whistle on them. See e.g. Harvey Weinstein. (Note: I am not saying that what Miner did is the same as what Weinstein did - only using Weinstein as an example of how a harasser in a powerful position can continue their behaviour for years without any consequences.)