Dear community
I am facing issues with preview of pdf documents created per code from base64string

Nevertheless, this document can be opened and looks good so far.
The mentioned issue comes in my tests, when I
1) take an existing pdf (manually created DocuRef on an TrvExpenses entry)
2) encode it to base64string
3) decode and create a new DocuRef from this base64string by using DocumentManagement::attachFile()
Here is the FO code

where docuRef is an existing DocuRef record from point 1.
When I don't use DocumentManagement::attachFile(), but create a file directly:

and make an upload of the file manually (on the same TrvExpenses entry), the preview is looking properly:
I have checked the links:
https://dynamicsuser.net/ax/f/developers/96818/attach-files-programmatically-using-x
https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/386758/converting-pdf-file-into-base64string-in-d365-finance-and-operations
Could you please help / advise me?
Thank's in advance!
Pavel