Not enough info to pin the exact reason. But here is a similar topic I responded to in which the crash is also in UE5, also references DX12 and also accesses invalid memory:
Quite likely it is just a simple bad line of code in the engine not checking for a nullptr. There really is no reason to modify your own system in an attempt to “fix things” if it’s an engine issue.