Hi,
I checked the call stack and I think that while updating the user plan system is crashing because of some duplicate record in buffer table.
I don't know exact problem without debugging but you can try following solution.
I think one of the plan (License) you are trying to update has Customized permission configuration.
Open this page.
Find the plan which you are updating for the user or find the plan with customized permissions(Check the customized permission Boolean on the side).
Once you find that plan, note down the permissions you have customized in the Default Permission Sets section.
Now see if for any of the plan, there is duplicate records for Permissions sets. If Yes, delete the duplicate one.
If not you can follow below steps for temporary solution.
You can disable the customization temporarily.
Now run the Get Users action again.
Now for those users for which the plan is updated you need to assign those custom permission sets manually so that permissions are correctly updated based on plan.
Then you can turn the Customized Boolean on.
I think this will solve the problem temporarily.
Regards,
Dhiren.