Random black macbook pro screen, not dead, fixes itself when I connect to external display
I have a macbook pro 2016 retina. I started to get random black screen since a few days ago. there is a small white line on the left corner of the screen. the backlight works and the laptop is working, I can hear sounds and when I screenshot it shows my normal screen. when I close the lid and reopen, the problem fixes for a few minutes. when I connect it to an external display via HDMI cable, it works normally. I reset my PRAM and SMC and updated to the latest version of OS. I could not find anyone with a similar problem online. does anyone have an idea what might be the problem?
MacBook Pro 13″, macOS 12.0