I disagree, he seemed to be very much aware of who was playing what role in various matters. I don't think its going out on a limb to say that he has far more experience in foreign affairs than does Trump. Trump is naive about a lot of things and speaks in broad terms whereas Biden is much more aware of history of such matters and the minutiae. Gaza/Palestine and Israel and the war cabinet are probably the sharpest example from last night.
But that has never really seemed to be what Presidential politics are about and I doubt that's any different this go 'round. As much as Biden may know, if he can't be effective in communicating about that now in the campaign, or can't be effective in his dealings with foreign leaders again because his ability to communicate (which has never been his strong suit anyway) is deteriorating, that does not auger well.
And of course given the current dynamic every miscue by Biden, every misstatement, every gaffe, is magnified and its hard to know where the line is between just mixing up names (Trump has done it, as we know) versus actual deterioration of mental acuity is evidenced.
Personally, I don't think its always one or the other with Biden. Sometimes its just mixing up names, which happens. But sometimes its a sign of lack of focus and cognitive skills, which gets worse over time, not better.
Its not like there is a specific line in time where one crosses over from "totally fine" to "utterly incompetent." It waxes and wanes, rises and falls, but always in a long-term downward path. And so, despite there being a distinct point in time where you can say "a ha, that's it," I do think Biden is at or has crossed the line and so should get out while the getting's good.