@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.
Nintendo 3DS XL
Nintendo 3DS XL Lower LCD
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
4