According to some of the testimony before the House Committee investigating the failed coup attempt of January 6th Trump was told the truth multiple times and still continued to spread the lie. I suspect that given Trump's Narcissistic Personality Disorder, it wasn't that difficult for Trump to convince himself that he actually won the election considering that thousands of his mindless cheering supporters attended his MAGA rallies while "Sleepy Joe" was campaigning before a few hundred supporters at the most at his drive-in events.