iPhone MagSafe Charger disconnecting during the night
I'm using an iPhone 13 Pro Max and having issues charging the device over night.
Looking at the battery graph in Settings, it shows that my phone is disconnecting and reconnecting to the MagSafe charger during the night, therefor not enabling the Optimised battery charging. I have an official Apple case so I took this off and tried charging and still happens, I have used a different wall outlet and this still happens, I have charged my phone using a normal cable in the same charging brick and works fine, I have tried charging the phone with a wireless charging pad and works fine.
I have taken the original cable back to Apple who replaced it with another however it is happening again. Any ideas?
iPhone 13 Pro Max, iOS 15