iPhone 12 Pro
also has a MagSafe charger which uses magnets to attach to the back of the phone. If your iPhone has this feature, try using the MagSafe charger instead of the traditional charger to see if that resolves the issue.