This has been fixed in the develop branch, here is the PR fix: patches were breaking while migrating by shadrak98 · Pull Request #27195 · frappe/erpnext · GitHub.
To solve this issue in your local, you need to reorder this patch erpnext.patches.v12_0.create_itc_reversal_custom_fields in patches.txt as in the PR.