frappe.exceptions.ValidationError: item_code field cannot be set as unique in tabItem, as there are non-unique existing values

Make sure to maintain adequate backup!
Try

bench update --force --reset
bench update --requirements
bench update --patch