Unable to run OpenAction when encrypted

I have the following code in C#

new License().SetLicense("Aspose.Total.lic");

var document = new Document();
document.Pages.Add();

document.OpenAction = new JavascriptAction("app.alert(0)");

// document.Encrypt("", "owner", DocumentPrivilege.AllowAll, CryptoAlgorithm.AESx256, false);

document.Save("output.pdf");

This works and it alerts on open. If you uncomment the line, it doesn’t alert anymore. Why?

@compagniedsdr
We are looking into it and will be sharing our feedback with you shortly.

@compagniedsdr

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56953

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.