https://docs.pega.com/bundle/example-word-template/resource/example-word-template.pdf
https://www.techpapers.online/post/ms-word-document-generation-from-pega
The issue was that HTMLToPDF accepts isClearCache as a parameter. By default it's set to false. If I set it to true it clears cache and loads css each time, otherwise it refers to the cache and does not refer to the updated CSS.