This sounds suspiciously like signs of a GPU hardware failure, or maybe a video signal cable problem.
The fact that a screen replacement hasn't solved the problem, and this has followed you over –I assume– at least two versions of macOS kinda cements that in my mind.
The fix for GPU failure would be a motherboard or GPU replacement, depending on how that MBP is built.
A video signal cable (from motherboard to screen) would be much less expensive, and I would think it would have been looked at by the shop that replaced your screen. It's a common point of failure on laptop computers. Again, I don't know how that particular MBP is built so the part could easily be non-servicable without replacing a larger component such as the screen.
On the positive side, if it's just a sometimes occurrence then you could still get quite a bit of use from the laptop.
Of course, the flip side of that is it could just completely fail tomorrow.
I'm sorry. I know this is no solution to the problem, but you did ask what could cause this.
Meanwhile, please do make sure you create a backup or two or three of your data. You'll kick yourself if the machine goes away and you didn't. If you don't use Time Machine, then CarbonCopyCloner or Super Duper! are excellent alternatives.
Back up your Mac with Time Machine - Apple Support