Removing user's accessprofile containing a string in name using workflow

Can you try this approach - using Get Access and loop
. Configure Get Identity immediately after trigger and get the identity from the trigger. Get Access action to get only access profiles. Perform loop over get access action’s access items (loop input - $.getAccess.accessItems). Within the loop, include Compare Strings(value 1-$.loop.loopInput.name) with contains “Privileged access”, if true perform Manage Access to remove the access