I am not understanding- Is the screen going off while plugged in idly? Or while you are actively using the computer?
If it's while being idle, try to check your power settings and choose how long the PC waits before turning off your screen while plugged in. In Windows 10, go to Settings-->System-->Power and sleep, and change it from there.
If it's while being active, sounds like some kind of circuitry issue. I found this solution from a quick Google search, from laptop.gemwon.com:
"Press the Windows key, then type "Troubleshoot" and press Enter. Select "View All" on the left panel and run the "Power" troubleshooter from the list to see if it works. Click Advanced, and then click Automatically apply repair. Also make sure to select "Run as administrator". "