MacBook Air 2017 keeps disconnecting from HDMI external display
Does anyone know why this would happen? It started happening some time ago that when I move the MacBook the slightest bit it starts flickering and it disconnects from the external display. I thought it was that maybe the port or the thunderbolt to hdmi adapter OR the hdmi cable OR the display were faulty, but I tried on another MacBook Air 2017, another adapter and another hdmi cable, another display, and the exact same thing happens. I really don't know what could've happened, but it's beyond annoying.
Has this happen to anyone else? How could I solve it? I don't want to get another MacBook, mine's doing amazing, this is the only bad thing.
MacBook Air 13″, macOS 12.7