Hate to point out what may be obvious, but since this is a self-build, have you entirely eliminated hardware issues? Bad connections or components that just don’t jive properly together? Just saying cause the first thing that came to mind when you described the issue is something similar I had a while back with mismatched RAM; it doesnt sound as though the comparison controls for these kinds of causes.
My guess is that this is a kernel or GPU driver issue, since it doesn't happen in Ubuntu 18.04, but it will take time to find exactly which version of the kernel get this to stop.
That's the story with all the assembled pcs out there.
Something is faulty, replace it.
When I stopped doing it myself and started buying workstations with an actual warranty, my problems ended.
My main machine has been a Debian testing for the past 3 years on a Lenovo P70 with 64gb of ram, not a single glitch, except those things a power user running bleeding edge software has to face .
The quality of the hardware is very important, Mac hardware is just good and extremely overpriced.
The whole point of leaving macOS for me was to be able to build my own hardware without spending an insane amount of money. You think MacBooks are expensive in the US, come to Brazil and try to buy one.
Similarly, new drivers might be stressing the system in a way the old ones didn't (eg. cooling might be insufficient).
Not saying that is happening for you, but the fact that older Ubuntu or Windows work correctly is not an indicator of trouble-free hardware.
On the other hand, if I did, I don't have the same troubleshooting power I would have with Linux. I guess /u/nkoren is right, computing in 2019 sucks.
Look, I love Ubuntu. Heck, I am a recognized Ubuntu Member, was the leader of the LoCo Team for my country for a while, helped a few universities in my state switch to Ubuntu from Windows, have a plaque signed by Mark Shuttleworth acknowledging my contributions and everything. But macOS is simply better, even though it sucks monkey balls right now — better for me, of course.
My Ubuntu machine — which I built to edit photos and game — currently runs on a Threadripper 2950X with two VEGA 64 GPUs. It should be a beast, and it is, but the entire computer freezes from time to time and requires a hard reboot to come back to life. Nothing I could find in the logs so far. Sometimes that happens once a week, sometimes it happens five times a day — heck, I had it happen right after a reboot once.
While the MacBook Air chokes when I open more than say, 45 tabs in Safari, I never had similar issues, and I only reboot this computer when I forget to charge it.
You can say Apple is dead all you want, but there will always be people like me that will go the Apple route because they are tired of troubleshooting shit all day — I spent a fair amount of time doing that in my earlier days, and I spend all day doing that at work, so why would I want to do that 24/7?