@ctrlaltdelete,Ren, Maybe there's a problem with the cable connection to the top screen that's causing it to power off as the hinge moves. Below 1st link is to disassembly guides to enable you to get inside device to check and clean all connections/reseat them and check for damage. Clean all the connections with a Qtip dampened with 90%+ Isopropyl Alcohol and reseat for good connection. If needed the 2nd link is a replacement lower LCD.
Good luck. I hope this helped you out, if so let me know by pressing the helpful button.
3DS XL Repair
Nintendo 3DS XL Lower LCD