I kinda had a similar problem with msi rx570 8gb the best I could do was install latest divers(From AMD). Disconnect internet (I unplugged ethernet cable) do this because if you have windows 10 it will automatically install drivers. After that I used AMD Cleanup utility safe mode then install the drivers you installed out of safe mode.
I still get the flickers every now and then but never the black screen.
Also when I would get the black screen and disconnect from display; I found for me if I hit CTRL+ALT+DEL would reboot it back on weirdly enough.
up to you if you want to try this. This was just my way.
Disable Fast Startup
Run DDU from safe mode with Internet disconnected.
reinstall driver with clean install while disconnected still.
If you didn't do all that you won't fix your issues.
If you did or did not do that do it then do the following:
Set your power limit to 50 in Wattman, not a 3rd party tweaker like Afterburner. (if you choose to return to afterburner later after being stable that's on you but return Wattman to defaults before doing that) You don't need Afterburner though. All those settings can be done without conflict right in Wattman.
Now next it sounds like you are thermal throttling. My RX 580 and most peoples do this under very demanding games. A custom fan curve should help but will make your fan a bit louder. You can save profiles and use these settings per game if you like not globally.
Do not follow the following picture for GPU speed setting as these are from my card. I wan't you to set a fan curve similar to this though and see if that does not help your situation. Report back if it doesn't and we can figure it out from there.
If you are experiencing with the latest drivers, then try for the 18.9.3 stable driver
And reduce the clock frequency to 100 or 200mhz of the GPU by using the wattman
I'll do a clean installation once again and try all the latest suggestions (stable driver, custom fan curve, tuning down the memory etc) and will report back with the results. Thank you all for the time you're taking to help me out, really apreciate it guys, you rock!