You make the mistake of believing that Trump tries to maintain a coherent narrative like the rest of us.
That's not how Trump works: he says anything at anytime, and doesn't care about contradicting himself or being fact-checked or anything. What matters to him is the instant soundbite. And the more soundbites, the better - what his fatass friend Steve Bannon calls "Flooding the zone with shit" so that nobody has enough time and energy to follow up on anything Trump says.
Trump has been doing this for decades. This has nothing to do with dementia and everything to do with his particular brand of shameless populism aimed at his simple-minded voter base who only care about the instant soundbites.