HI(Bonjour)!
As Apple investigate this problem, we cannot now say if it's software or hardware related.
In the first case, Apple's and AMD ingineers's may publish a software patch to resolve the issue. We don't know the timeframe for this solution.
If it' hardware one, may be we can be stock in a long wait to get a perfectly functioning replacement machine. Sometimes Apple responds rapidly, other times, an action Class lawsuit is required (As MacBook Pro 15" 2011 AMD defective graphic card).
So, If you need you machine to get work done and earn money, keep it and cross your fingers for the software side of the problem.
If you're not confortable, ask AppleCare for a return within 14 days.
As Yo6 wrote in https://discussions.apple.com/thread/251720089?page=2
"I received my brand new iMac Wednesday with the same configuration and I experimented exactly the same problem.
Today I called Apple Support.
The support told me:
- the problem is known internally by Apple. The internal issue had been released yesterday (afternoon, around 3:00pm)
- engineers are working on these random horizontal white lines / 5700 XT 16Gb
- we don't know if problem is related to hardware or software
I don't know what to do with my brand new iMac :
- Option 1 : return to Apple Store and ask for a new iMac with a cheaper graphic card (but working!)
- Option 2 : hope the problem is software and wait for next FIX.
If the problem is hardware I will own an iMac defect by design for many years..."
Michel B.