If bad connection between flex cable connectors for front display assembly, you will need to straighten out the connectors if they look slightly bent. You can do this by hand.
I've also had one case where the gold pin thing inside the connector was sticking out of place and had to push it back in place to get the screen working properly. This particular issue only happens if the plug has become damaged after failing to plug it in (and probably force it in) properly to the logic board.
As you've put the LCD on another iPhone and works fine, then the two solutions above will not work for you.
Check if any logic board display pins if they are bent, have any water damage, burn marks or any corrosion (Corrosion is usually identified by green markings on the motherboard, the white stickers LCI indicators. If these have turned red that means the phone has been in contact with water damage internally.
Another reason could be the display IC chip causing this issue. Which is fixable but it's not easily done as the chip would need to be heated up at a certain temperature to take off and put a new one on. If I'm correct, these are called BGA board repairs.