Diagnosis
This is almost always a firmware bug with the Variable Refresh Rate (VRR) control on this monitor. It's called VRR flicker.
How to Fix It
Turn off Adaptive-Sync in the monitor's OSD menu. Press the joystick. Go to Game → Adaptive-Sync → set to Off. This will stop the flicker immediately. You'll lose G-Sync/FreeSync.
If That Didn't Work
If the flicker happens even with Adaptive-Sync off, try a different DisplayPort cable. Use the certified one that came in the box. A bad cable can cause signal dropouts.
Heads Up
Samsung has released firmware updates that try to reduce this flicker. Updating firmware is risky. If the process is interrupted, the monitor is bricked. Only attempt it with a USB stick formatted correctly and if you're comfortable with the risk.