I am having this same problem, and I don't understand the instructions here for how to fix it.
If I go to edit category and add the code to the title, it just adds the code (character for character) to the url and still gives me /page/2 after. I still have a duplicate title.
If I go to Yoast SEO settings - titles and metas and go over to the archive tab, there is nothing for category archive. Only author and date.
Where do I put this code?