Fixes #9874
ZIO error recovery combinators (like catchAll and foldZIO) were silently dropping defects when they co-existed with typed failures in a composite Cause tree.
Updated the logic in foldZIO and foldTraceZIO to:
Cause.keepDefects.This ensures that critical defects (Die) are never swallowed while maintaining correct recovery behavior for parallel operations (like foreachPar).
coreTestsJVM passed.Ayush Kumar Jha
@jhaayushkumar
ZIO
@ZIO