MacBook Pro (Late 2013) Randomly Shutting Off
My MacBook Pro keeps randomly shutting off. Seemingly no pattern to it, charging or not charging, lots of tabs/apps open and working hard or not really doing much.
The screen suddenly goes black, just the backlight showing for 5 or 6 seconds. I then have to press the power button as if turning it on for the first time, the white apple logo with the black screen comes up (and makes the characteristic opening sound) and then presents me with my log in screen. When I log in the loading bar comes up below my login name, as if it's just done an update or something. It loads for 10 or 15 seconds before starting up. All my applications have been closed etc.
What could be causing this? How can I fix it?
It's a MacBook Pro (Retina, 15-inch, Late 2013), fully updated to Mojave 10.14.5. Battery is showing "replace soon"
MacBook Pro 15", macOS 10.14