is this a new PDM, or did this issue only start up recently?
because the car boots up fine, and power cuts out randomly while driving, i don't think its the 12V especially since you just replaced it.
i had very similar symptoms after a warrantied PDM replacement on our '14 SL. also, on long charging sessions the car would stop taking a charge and the OBC would not respond for a while. waiting for a few hours clears this problem. otherwise, no DTCs present at all and the car looks fully functional. but whats scary is the car would randomly lose power and exhibit the same symptoms you describe while driving. looking back it was actually a huge mistake to even drive it after the first time it happened.
in the end i don't actually know what really happened. the dealer tech said he found water in a low power signal plug of the PDM, and because we had below freezing temperatures, it would short out the contact when it got warm (after charging/driving), and then froze again when things cooled down. after they blew all the water from the plug and reconnected everything, everything worked fine. this was the best explanation that we got but i'm not 100% certain this is what happened... because between sessions i also noticed that the firmware on the new PDM was also reconfigured. (currently, the new part is no longer showing a part number or serial in LeafSpy)... and the water excuse (which they say could have invalidated the warrantied PDM replacement which would have been over $4k CDN) could have simply be a way to scare us in accepting the smaller diagnostics charge while they figured out really what was going on. the plug is fully waterproof, vertically plugged and underneath the side of the box so how water got in would have been a mystery. also, the only time it was removed was during the PDM replacement...
anyway, this was part of a pretty difficult experience that lasted over a month for us over christmas, and since then we've had a fully functioning car so we decided to let it go. i'm currently trying to figure out the no part number/serial thing is going to be an issue in the future...
of course the above was just our particular story, so the actual problem you're facing could be completely different. if you have a trustworthy dealership nearby, i'd definitely try to work it out with them.
feel free to PM me with any further details if there's any information that you're not willing to disclose publicly for various reasons...