permissions inheritence does not work from a parent folder. Object permissions are based on the Role creating the object at the time. See the Object Permissions Template in the Role
You want to use the ‘Group.bulkApplyBlAclTemplateByGroup’ command. I’m assuming you are using the ‘addPermission’ command which applies only to the target object and does not recurse.
As scott notes, there is no inheritance. In the gui you may have used the ‘update permissions’ on the group which recursively applies acls in a one time operation. Any new objects added or included in the group after the acl application will not have the same acls as the existing objects on which the permissions were previously updated.