Really weird problem that started today: my MacBook Pro Retina 2015 won’t stay on unless I hold down the power key and keep it held down for the entire time I’m using it. It works perfectly as long as I keep it down but shuts off within a minute or so after I release it. I’ve reset the SMC and NVRAM, to no avail.
This is not just a power on/boot issue (Google hits are all about Macs not powering on unless the power key is held down for several seconds, but then stay on).
I don’t think it’s a software issue, but I installed the 10.15.3 update a few days ago.
The only clue I have is a very brief “Do you want to shut down/sleep” dialog that popped up once before the random shutdown but hasn’t since. I’m guessing this is some kind of hardware issue like a dirty power switch contact.