If the page starts with TemplateStyles tags, they are removed from the output of the lead section when using page/mobile-sections endpoint. The endpoint page/mobile-sections-lead, naturally, has the same problem. I think this is a bug with the mechanism of determining the sections, since page/html and page/mobile-html endpoints get correct output.
I have discovered this issue on the main page of Russian Wikipedia:
- https://ru.wikipedia.org/api/rest_v1/page/mobile-sections/Заглавная_страница
- Page in Wikipedia: https://ru.wikipedia.org/wiki/Заглавная_страница
The same happens when other sections are present: