openssl pfx created under Windows bigger than under Linux

I have a good working bash script under Linux for creating PFX certificates.
But the PKI is a Windows-server, so I always have to copy between Linux and Windows machine.
I’d like to do all tasks in one script on the Windows-server with openssl.
This basically works, but the created PFX-certificates are bigger (3395 bytes) than the certificates created on Linux (3253 bytes) and some devices do not accept them.