Macbook Pro keeps shutting down even when magsafe is plugged I have MacBook Pro Retina Mid 2014 with Catalina installed. Initially my Mac is randomly shut down and later it shutdown every time I logged on to the Mac. It will display the desktop for a few seconds then shut down.

The Mac keeps shutting down in the Safe mode and also Recovery mode. But when I run Apple Diagnostic it says that there no errors found. 

When I look in the log from advice in comments, I get "shutdown cause -128"

Do you think my logic board is broken or this is related to something else?
This could be a Hardware issue. 

But you have these options that can help: 

1) Reset your Mac's NVRAM or PRAM.

2) If you continuing experiences issues, try to reset the SMC of your Mac.

I hope that works.