*** Found permanent Hardware fix ***
Folks, I thought that you might be interested in my recent find of what looks to be a permanent hardware fix to the infamous random shutdown issue.
TL; DR
Replaced the factory-installed Apple Samsung F-Type SSD (imprinted Model ID ends to /0A6) with an Apple Samsung G-Type SSD (Model ID ends to /0A4). Machine now behaves totally normal.
Full story
I bought a bunch of 512 GB Apple Samsung SSDs last week for resale, of which one was intended to be an upgrade for a 'random-shutdown' MacBook Pro Retina (15" Mid-2014; it worked OK with the Thunderbolt-Ethernet-Driver removed ... but then of course lacked the Thunderbolt Ethernet).
The MacBook had an Apple Samsung SM0256F (so an F-Type; Model ID MZ-JPU256T/0A6) installed when bought. Did blank out after a few seconds, fans spun up, followed by shutdown shortly thereafter. The known problem.
I first tested consecutively 4 pcs. Apple Samsung SM0512F (so again F-Type; Model ID MZ-JPU512T/0A6) - sudden shutdown pattern on each of them.
Then I tested 2 pcs. Apple Samsung SM0512G (note: G-Type!; Model IDs MZ-JPV5120/0A4 and MZ-JPV512S/0A4) ... and to my big surprise, no sudden shutdown with those installed. The MacBook behaved totally NORMAL!
Even better side effect is that according to Blackmagic Disk Speed Test, the G-types are significantly faster than the F-types.
G: ~ 1,320 MB/s Write & 1,500 MB/s Read
VS.
F: ~ 700 MB/s Write & 720 MB/s Read
I assume that the G-types have more PCIe channels, which perhaps draws a bit more power, thus likely prevents the CPU to cross that low-voltage threshold, which AFAIK causes the shutdown issue. See here for more info on the various Apple SSD models, wherein the PCIe channels differences are described ->
https://beetstech.com/blog/apple-proprietary-ssd-ultimate-guide-to-specs-and-upgrades
It remains to be tested, if this only did the job in my particular random-shutdown MacBook or if it works for your MacBooks as well.