Hi,
I just ran into the same issue and found at least a temporary solution that works for me for now. After reading some of the answers here, I tried to tilt the screen towards the keyboard, and indeed, the lines disappeared after a certain degree. I tilted the whole macbook up, so that the tilted screen was in the "normal Position" (as if not tilted). Then I slowly put the screen back in its normal Position. The lines didn't reappear.
When I afterwards closed the macbook quickly and reopen it again, the lines were there again. But after that, my "trick" worked again. I had some pinkish/ rainbowy artefacts at the top of my screen, they disappeared as well after I slowly opened the second time. What I have left now, is a pinkish glow at the edges of the screen, but I'm not sure if they were there before and I just didn't notice. Maybe the screen is just old. After all my Macbook Pro is from 2016.
So I'm thinking, it must be some kind of connectivity issue. Especially, since I used a laptop Stand for some while (few months) now, where the laptop is standing a little bit vertical. Maybe that caused something inside the laptop to loosen up. But thats just guessing... All I can say is that I'm happy for now that the tilting trick worked for me. Good luck to you!