My father was just like that, always right & had to get the last word in. I learned how to deal with this. It is not easy to do, but if you let him 'win' with the last word......it's over.
Just smile at him, let him think he is right, which of course he isn't always, but it stops the bantering back & forth between you. Change the subject or just stop talking, just do it all with a smile. It works.
Good luck !!
Bunny