I did research on my own pc and narrowed this error to user login. Basically if you're not logged on the pc with a Microsoft account it would throw this error.
So just recently i updated my pc from the windows update and found myself encountering this same exact error when either gaming or shutting my pc down.
At first i thought my ram was going bad, later after running the Memory Diagnostic Tool and all seemed well with no corrupt files or memory issues I did some software debugging.
During the debugging process i was able to find the culprit that pointed me towards explorer.exe, i was like that cant be cause its the file folder. Upon digging more deeply i encountered a certain module that uses explorer.exe, msedge.exe and winlogon.exe, all these .exe have in common is running with the same module.
With more digging and debugging the whole issue pointed me to services.msc/ gaming input devices. For now I disabled this service and haven’t gotten the error. My theory is something with windows services.msc and gaming input devices, is causing a memory error along with type of motherboard cpu ram combo.