I contacted support about this same exact issue and when they looked in their records to see if this was a reported issue, I was shocked when they told me only 1 person reported this issue.
Here’s a list of the few threads I saw (including this one) with the exact same issue with MagSafe/Wireless Charging on iPhone 15s. There’s more, but I’m too lazy to collect every single one lol.
iPhone 15 charging with MagSafe charges f… - Apple Community
Iphone 15 Pro not compatible with some wi… - Apple Community
iPhone 15 Pro not charging on Belkin BOOS… - Apple Community
iPhone 15 Pro Max not charging while off in Mag… - Apple Community
When I mentioned this “discussions website” to Apple Support via phone support, and told them there’s more than just one person experiencing this issue, support told me they don’t monitor this website, which is unfortunate because if they did, a patch for this bug could’ve been in the works WEEKS AGO just in-time for the next iOS 17 iteration update that’ll be released.
I have multiple MagSafe charges (including the Apple branded one), and they all act the same way when using my iPhone 15 Pro Max. They’ll charge for a few seconds or a few minutes then disconnect completely. I had to switch to just using a USB-C cable that’s connected straight to the wall and the phone because MagSafe just doesn’t work anymore for the past 24hrs to 48hrs.
My iPhone 15 Pro Max is running iOS 17.0.3.