I think he knew fully who would do the "replacing": not the rank and file, but the GOP-e. Given the likelihood that they would install a pro-abortion RINO it is understandable that he stayed in as in his mind he had no moral alternative and had every reason not to award Party perfidy toward a conservative nominee. If at this point he wins, that would be a good thing. We have no alternative but to support him, despite that he's an idiot.
What makes you think a RINO would take his place? Is Sarah Steele a RINO? I have suggested several times that he make a deal to withdraw if he could name his replacement. That would be a win-win. But he won’t do that because, despite what he says, it is about him.