Score Editor- beams not showing

I have the same problem with Cubase PRO 9.5.21 (Windows 7).
Here what I see on Score Editor (correct):
score_editor.png
Here what is printed (paper, PDFCreator, XPS etc.):


Sometimes the upper beam of the groups of 1/8, 1/16, 1/32 and 1/64 is missing.
In the image it occurs only for the first groups of 1/8 and 1/16, but this can also happen:
pdf_print_32_64.png
The problem occurs starting from page 2, usually only in the first 3 or 4 staves (more or less randomly).