Hello,
All samples are fully tested. In the sample you point out (https://www.phpdocx.com/api-documentation/layout-and-general/create-Word-custom-paragraph-style-with-PHP , example #2), the fontSize option is set to 26, that is the equivalent to 13 (MS Word font size units: value / 2) as you can see in the screenshot of the example.
We have run it setting others fontSize values to the paragraph style and the output is the expected (we have opened the DOCX with MS Word 2007, MS Word 2013, MS Word 2016, LibreOffice 5 and LibreOffice 6).
What program and version are you using to open the DOCX?
Regards