Try to use indexOf to check if the field conatins "Permission" string, please see the modified Json below:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{"id": "6b294902-f477-4657-819e-74bcfd2c92af"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "2px solid black",
"background-color": "transparent",
"cursor": "pointer",
"visibility": "=if(indexOf(toLowerCase([$FileLeafRef]),'permission') != -1, 'visible','hidden')"
},
"children": [
{
"elmType": "span",
"txtContent": "Update permissions"
}
]
}
Reference:
Formatting Values Using “Contains” in List Formatting
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…