Sounds like a loose cable from laptop to lid.
If you have a monitor, try plugging it in. If problem persists it would suggest the graphics chip is failing but if it is OK on the external monitor, it confirms it is a loose cable.
OnePlus 6 review
Razer's Core X GPU enclosure hands on review: It's cheaper, bigger, and even works with Macs
MacBook Pro keyboard issues and other problems
E3 2018 : dates, conférences de presse, billets et plus