He did that strictly for political reasons, and I cannot forgive him for it - but I still don’t think he collaborated with the North Vietnamese while he was a prisoner.
There are recordings of his collaboration.
Bing search “recordings of McCain from Hanoi”