You can erase your iPhone, your iCloud lock will remain active (this is different from removing your phone from iCloud which you shouldn’t do). Erasing your phone protects your data in case a workaround for the iCloud lock gets invented in the future
You can erase your iPhone, your iCloud lock will remain active (this is different from removing your phone from iCloud which you shouldn’t do). Erasing your phone protects your data in case a workaround for the iCloud lock gets invented in the future