Hi like everyone else I've also been having the random black screen when playing games but i was able to fix it with this solution.https://www.reddit.com/r/Amd/comments/e1baxu/5700xt_blackscreen_after_tabbing_in_and_out_of_a/
I made this post on Reddit, thought it would be helpful in the AMD Community too. Not sure if it will work for everyone but it worked for me. i am not having black screens anymore. Cheers! Let me know if my solution worked for you guys.