Hi,
Please do try these troubleshooting steps that may help.
- First is to do a hard reboot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds then test it again.
- If it will not work, test the battery and AC adapter. Remove the battery off the laptop then connect just the AC adapter and see if it will stay ON.
- If the laptop will still shutdown without the battery, do try a different AC adapter that has the same voltage.
- Again, if it will still not work that could only mean it's a motherboard problem or it can be overheating.
- Do clean the inside of the laptop and remove the dust off the fans and apply new thermal paste on the CPU and GPU.
- If all these will not work the motherboard...