try integrating these changes
or follow this How to fix the "Magick" 14.7.0 bug in source build engines in UE5.6.1