Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001c65bc205d0

I had much trouble with crashes and also bluescreen every time i started UE5.5 with sm6 and directx12. I search the internet and solutions but none worked like reinstalling drivers and such.
But i found the solution, it had to do how it compile shaders thought even i sett to sm6 in project settings.

What i found was adding, shadermode=6 in the Consolevariable.ini file in the install location and engine/config directory.

To be sure it recompiles you can delete saved, intermediate and derivedcache folder and try first with a new project to see if it works.

Also project settings have to be set to sm6 and directx12 and visual c++ 12.