I'm really confused about the Sans fight. So normally, whenever you defeat a boss, they turn to dust and disappear. However, how come Sans was still walking after you defeat him? Also, why did you mention Papyrus, even though Papyrus was dead?
He dissolves off-screen, which can be heared. I'm pretty sure it's implied that determination still holds him together for a few seconds and that he doesn't want you (the evil person in that route) to have the satisfaction of seeing him dissolve.
I'm not sure what you mean with Papyrus. The dialogue depends a bit on how you played before. But of course he can mention Papyrus, he doesn't just suddenly forget about him.