Gigabyte M28U Black screen/restarting issue

Need help with a Gigabyte M28U I bought about a month and a half ago, which is connected to my GPU via HDMI 2.1 (The PC was also built at around the same time with new parts). It's connected to a power strip together with my PC and 2nd monitor.

For the first 2 weeks or so the monitor worked well without issues, but sometime after that it started doing this weird thing where it would suddenly restart itself; the screen would go black as if the power suddenly turned off, show the gigabyte logo, start and then repeat all of that every 5-10 minutes or so.

Sometimes it can go for hours without having an issue, and then out of nowhere start restarting every 5 minutes. And sometimes it can just start doing the restart thing when I turn it on in the morning.

When it restarts I hear an electric noise in my headphones (but not outside of it). It's also the only thing that's restarting, my PC and 2nd monitor keep functioning without an issue.

It happens no matter what I do at my PC. It happens when gaming, when watching a video, when browsing, even when just completely idle.

I googled the issue and a few other people have a similar issue. I tried almost everything I can think of:

Unplug and plug the monitor again

Change HDMI ports

Try DP instead of HDMI

Turn the resolution and refresh rate down

Turn off HDR

Turn off KVM

Test if it happens on a console as well (it does)

Change HDMI cables

Change power cable

Update the monitor firmware to the latest version (F10)

I'm seriously at my wit's end and I have no idea what to do. I'm hearing some people reinstalled their GPU driver and that fixed it, but seeing as this issue also happens on my consoles I doubt it'll work. I'm starting to think this might be an electrical issue as well, but seeing as my PC and 2nd monitor still work fine, I'm not sure about that. I also can't test it because there's only 1 outlet here, and I don't have space to put a UPS here (i'll also be wasting money if it won't solve the issue). Also the electricity here is pretty stable. Any ideas?