This question, moves me (and many) for many decades. Not only John 18, but many verses which are intimate dialogues - for instance the Angel who administers Jesus at the Garden of Olives. This and many other occurrences of the Bible, years ago where a real big problem in another Catholic Forum, when some asked:
If Jesus was alone there and his disciples asleep - nobody else about; how does the Gospel know what was going on and what Jesus said and prayed???
My many answers cumulated on my thoughts, that Jesus after His death and resurrection spoke to so many, and surely most to John and His Mother Mary - and many more. Once He spoke to over 500 (1Cor 15,6) And as John wrote in Joh 21,25 - Jesus did and taught and said unmatchably more than the (though little, but most essential) written down in the Gospel. The rest is up to our belief. If we need more evidence, we got no belief at all, and it’s simply a feast for atheists, to use suchlike arguments of “Nobody witnessed it” as lever to make the Gospel doubtful
But we do own a lot more than eye- and ear-witnessed Gospels. We got Whitsun; the teaching and outpouring of the Holy Spirit as well as the administration, management, guidance and auspices of the Holy Spirit. In many art-works pictured also as Angels, leading the writing hand of the Evangelists.
In the Old Covenant we got a lot told by God Himself. So why not in the New Covenant all the same?!
If all truths need another confirmation through witnesses, we are a poor lot.
Furthermore - if we instead of owning belief and absolute trust in God (to believe something - in this case things between God and us), but instead we’d ask God for prove and evidence, we actually don’t owe even two cents of belief. Anything more impertinent thinkable than asking for evidence and prove from God? Definitely not! Jesus cited in Matt 4,7: 'You shall not tempt the Lord your God!"
Yours
Bruno