had the same problem with new rig I built with an Radeon RX 590 red devil GPU, tried to make it work for like 2 weeks, literally tried everything and did so much research.

Finally I took the card back and traded it in for an Asus gtx 1060 SC, I put the new card it, turned PC on and it was flawless plug and play....... so for me it was the GPU on my build...
these codes are super frustrating... I feel your pain...