Keitada Yukio didn't harbor any illusion about escaping his crime and was mentally prepared for the death penalty, yet there was something he couldn't fathom. He had disguised himself as a "normal person" for twenty years without ever revealing a flaw to the outside world—having no girlfriend in high school wasn't really a flaw, and even if it were, he simply had to sense the slightest suspicion from Nanahara Takeshi and invite him over for a home-cooked lunch, letting them see his "happy" marital status, and there would be no problem.
Even if Nanahara Takeshi was highly suspicious and continued to investigate him or slowly found other means to discover that he was the one who had tortured the rabbits years ago, it would still take a process. He would have acted in advance, finding an opportunity to secretly kill Nanahara Takeshi and then decided whether to flee or stay based on the situation.
A dead Famous Detective certainly couldn't continue investigating!