Answer
The IFS Failure End Event's purpose is to roll back all the workflow's prior transactional work when it's raised, and an ordinary API task's work (including a mail-send call routed through an API task) gets rolled back along with everything else on that path — so the email being lost is the rollback working as designed, not a bug. Replace the mail-sending step on the failure path specifically (not on the success path, which already works) with a REST task instead of an API task; REST task work isn't subject to the same transactional rollback, so an email sent that way survives even when the workflow ultimately fails.