I have created an additional FontSize element (FontSize2).
Note that both elements are identical, apart from their name.
The font size in PowerBi shows as 'Text Size 12 pt' and 'Text Size 12 %' and doesn't seem to be a way to set the unit of measure.
Here is a same case for you refer to:
The fontSize is predefined Power BI capabilities name.
You might try to rename the second fontSize property to textSize, titleFontSize, secFontSize, secTitleFontSize.