Some Apple iPhone XS and XS Max users are reporting about their iPhones not charging automatically even after plugging in when the screen is off. Affected units require the screen to be on and re-plug in their cables for charging to begin. A majority of XS and XS Max models exhibit the problem. However, soon after the issue became wide-spread, users of older iPhones and iPads started reporting that they too have noticed the issue, meaning that it can be a software bug on the iOS 12.
iPhones with the issue seems to be not responding when plugged in as they should. Typically, iPhones light up the screen when plugged in to charge and starts to charge with the battery indicator visible on the lock screen. There seems to be no problem with the device when the iPhones are turned on as they stop working only when it is off.
At this moment, it is unclear if it is a hardware or software issue, but since only a hand full of iPhone users are reporting this, it could be a hardware with a certain batch or an intermittent firmware issue. Users affected by the problem indicate that the iPhone works with wireless charging pads normally. A few users are reporting USB Restricted Mode being the cause. Either way, we will have to wait and see what Apple has to tell about it.