Despite the failure of failing the test, he still learned something from it.
Despite the failure of getting a new job, he got a promotion at his current job.
Despite the failure of his distaction, he still gave me some time.
Despite the failure of his trick, he still tricked him afterwards.
Despite the failure of his prank, he still pranks him later.