I have had the same issue for two years and it has progressively gotten worse. I use Ubuntu and have very similar hardware. The piece of hardware I have traced my issue to is the 5700XT. I ran some Phoronix stress tests on my video card and reproduced the same crashes. I also looked up the MCE errors that were being produced and they also pointed towards that card. I’ve given up trying to fix it and I will be purchasing a different graphics card soon.
To diagnose your issue, do you see any MCE errors when your system reboots? If not, run journalctl and grep for ‘MCE’.