You ran Windows memory diagnostic, but have you run Memtest86? That is the test you FIRST want to run, when testing for physical memory or memory configuration errors. And, you want to run it ON the machine that is having troubles, if possible. If you can't even get Memtest to run, then there is, no doubt, a hardware issue, because it doesn't involve Windows at all.
Memtest86
Go to the Passmark software website and download the USB Memtest86 free version. You can do the optical disk version too if for some reason you cannot use a bootable USB flash drive.
Create bootable media using the downloaded Memtest86. Once you have done that, go into your BIOS and configure the system to boot to the USB drive that contains the Memtest86 USB media or the optical drive if using that option.
You CAN use Memtest86+, as they've recently updated the program after MANY years of no updates, but for the purpose of this guide I recommend using the Passmark version as this is a tried and true utility while I've not had the opportunity to investigate the reliability of the latest 86+ release as compared to Memtest86. Possibly, consider using Memtest86+ as simply a secondary test to Memtest86, much as Windows memory diagnostic utility and Prime95 Blend or custom modes can be used for a second opinion utility.
Create a bootable USB Flash drive:
1. Download the Windows MemTest86 USB image.
2. Right click on the downloaded file and select the "Extract to Here" option. This places the USB image and imaging tool into the current folder.
3. Run the included imageUSB tool, it should already have the image file selected and you just need to choose which connected USB drive to turn into a bootable drive. Note that this will erase all data on the drive.
No memory should ever fail to pass Memtest86 when it is at the default configuration that the system sets it at when you start out or do a clear CMOS by removing the CMOS battery for five minutes.
Best method for testing memory is to first run four passes of Memtest86, all 11 tests, WITH the memory at the default configuration. This should be done BEFORE setting the memory to the XMP profile settings. The paid version has 13 tests but the free version only has tests 1-10 and test 13. So run full passes of all 11 tests. Be sure to download the latest version of Memtest86. Memtest86+ has not been updated in MANY years. It is NO-WISE as good as regular Memtest86 from Passmark software.
If there are ANY errors, at all, then the memory configuration is not stable. Bumping the DRAM voltage up slightly may resolve that OR you may need to make adjustments to the primary timings. There are very few secondary or tertiary timings that should be altered. I can tell you about those if you are trying to tighten your memory timings.
If you cannot pass Memtest86 with the memory at the XMP configuration settings then I would recommend restoring the memory to the default JEDEC SPD of 1333/2133mhz (Depending on your platform and memory type) with everything left on the auto/default configuration and running Memtest86 over again. If it completes the four full passes without error you can try again with the XMP settings but first try bumping the DRAM voltage up once again by whatever small increment the motherboard will allow you to increase it by. If it passes, great, move on to the Prime95 testing.
If it still fails, try once again bumping the voltage if you are still within the maximum allowable voltage for your memory type and test again. If it still fails, you are likely going to need more advanced help with configuring your primary timings and should return the memory to the default configuration until you can sort it out.
If the memory will not pass Memtest86 for four passes when it IS at the stock default non-XMP configuration, even after a minor bump in voltage, then there is likely something physically wrong with one or more of the memory modules and I'd recommend running Memtest on each individual module, separately, to determine which module is causing the issue. If you find a single module that is faulty you should contact the seller or the memory manufacturer and have them replace the memory as a SET. Memory comes matched for a reason as I made clear earlier and if you let them replace only one module rather than the entire set you are back to using unmatched memory which is an open door for problems with incompatible memory.
Be aware that you SHOULD run Memtest86 to test the memory at the default, non-XMP, non-custom profile settings BEFORE ever making any changes to the memory configuration so that you will know if the problem is a setting or is a physical problem with the memory and it is a good idea to run it AGAIN, after enabling the XMP profile to verify that none of the XMP specific profile settings or timings are in disagreement with the motherboard, especially if it is a memory kit that is not already shown to be validated for that board on the memory manufacturer or motherboard manufacturer's compatibility list.