Firstly, I have rest everything.
It didn't not help at all.
The lines didn't appear when I take screenshots.Hence, It couldn't be the GPU issue.
The lines disappear after not using for a while.
As ifixit has given an explanation that
The T-CON board is temperature sensitive! When it gets over heated it looses its clocking so the horizontal & vertical raster of the LCD signals gets messed up which is why you see the black & grey lines on either the top or bottom of the screen.
You'll note the display is better after the system has sat a day or so or if you place the system in a cooler location for a few hours. Sadly, once its become stressed it doesn't take as much heat to make it fail again. As it breaks down the vertical scan starts to also fail.
https://www.ifixit.com/Answers/View/510833/Horizontal+lines+on+top+and+bottom+screen#answer642687
Lastly, I have given the MacBook Pro at the service center. They have analysed the laptop but they didn't give me the exact reason why it is happening. As you have mentioned Cable issue, GPU is failing or LCD is failing. They might have not reproduced the issue.
What should I have to do?
This is completely disappointing.