The line height is not applied when rendering the video

We define a line height of 1.4 (You can see it in the image on the left side). But when rendering, the styles are lost, This distorts the visual order of the content on many occasions. how can I fix it? We use the Api: Render a video via template.

Before & after rendering :