"Sorry to hear you are having a problem with your internal display. Do you see this effect on an external display? If not then the issue is located within the internal displays logic. If you do see the effect on an external display then you have a logic board failure within the GPU logic which drives both internal and external displays.
So let’s talk about the cables a bit as this is more confusing than the older models. In the older design Apple used an eDP from the logic board directly into the lid where the ePD signal was then converted back to the needed raster signals the LCD needs to display the image we call this bit of logic the T-CON. You’ll often find digital TV’s and desktop displays have the same logic board.
So in your case we also have this connection but its a bit different here as unlike the older 2015 MacBook Pro retinal models this cable just moves the signal from the main logic board a few centimeters to the T-CON board which is located on the backside within the main case as you can see here
The bare connector on the T-CON board is the eDP connection. Now keep in mind this cable between the main logic board does not flex! As both boards are anchored to the uppercase. The two cables at each end is what flexes every time you open and close the lid.
While a bit different than the FlexGate issue outlined here: The Design Flaw Behind MacBook Pro’s “Stage Light” Effect is where the backlight cable’s bending got into trouble. Apple fixed the issue by lengthening the cable as described here 2018 MacBook Pros Try to Solve Flexgate Without Admitting It Exists.
So why does this have a bearing here?? The point is the constant flexing does fatigue the cables so while your issue is very different they are born from the same issue! These display cables are not replaceable as they are part of the LCD panel and are soldered to the T-CON board as you can see here:
So the bottom line here is you can’t fix this without replacing the full display as the iFixit guide goes over MacBook Pro 13"" Function Keys 2017 Display Assembly Replacement"