Also as for UE 5.0.2 i see that it has ShaderCompilerCoreCountThreshold=12 (Ryzen 5900 12 cores 24 threads). It uses only 12 logical theads (half from what i have). And has comment
; Percentage of your available logical cores that will be reserved and NOT used for shader compilation
; 0 means use all your cores to compile Shaders
; 100 means use none of your cores to compile shaders (it will still use 1 core).
I think lowering this number from 12 (for me) to 1 or 2 may do the job.