Just get any Displayport cable, you can look at Vesa certified if you'll be going to higher than 144hz at 2k or higher resolution at any point
Is it a decent HDMI cable? I've found they can vary quite wildly and it does have an effect like this.
Put the cable into HDMI 2 and it goes to 144hz but flashes, why ?
Maybe something like a Nordost Valhalla 2 HDMI cable thenYou've spent a lot of money on the monitor and you've spent a lot of money on your PC, so why scrimp on the connection between the two? You don't need to buy fibre-optic cables like I did.
How long is the cable? I have found copper Displayport cables can get twitchy after about 3m; I don't know about HDMI. I would get a high grade Displayport 1.4 cable. You've spent a lot of money on the monitor and you've spent a lot of money on your PC, so why scrimp on the connection between the two? You don't need to buy fibre-optic cables like I did.
What GPU are you using? I've had cards in the past that have issues on some ports but not other, obviously faulty behaviour.