You are missing PermissionsString in your code.
As per the reference you provided, you can add any permission type from the below list based on your requirement:
Read more about SharePoint Base Permissions at SPBasePermissions ...
The screenshot you provided looks like an external sharing link, but based on my testing, I cannot reproduce your problem.
If possible, please provide more information on setting permissions for these folders step by step.
How to Set Unique Permissions in SharePoint: