For the past few months I've been running into an issue where after restarting my PC, it will get stuck in a boot loop that eventually kicks me out to the gigabyte error screen that says "Boot Failure Detected." It offers me an option to reset to optimized default settings, and whether or not I choose to do that or keep the current settings, it doesn't really seem to change anything. The strange thing is that this doesn't always happen. Sometimes, the computer will boot normally, and other times it will be stuck in a loop until I fully shut it down and turn it back on. I thought it might be some issue with me using the XMP profile, so I tried turning down the memory clock and it didn't change anything.
I've tried to debug it with the POST codes, but info on Gigabyte POST codes is hard to find, and while I've gotten a memory error code (54 and 52), the codes seem to change with each boot. I use the PC for rendering and FX simulations, and once it has booted it's completely stable and will do a week-long render at full utilization with no issue, so I'm at a loss as to what could be causing this. I've been unsure how to proceed because I can't even tell for certain what's causing the issue, so I'd definitely appreciate any help.
Specs:
OS: Win11 Home 64bit (Build 22621.2861)
Mobo: Z690 AERO D (BIOS Version F22)
CPU: 13900K
RAM: Corsair Vengance 2x32 DDR5 5200MT/s CL40
GPU: RTX 4090
PSU: Corsair HX1500i