May 20, 2021, 15:2805/20/21
This may have been the case in the past, but certainly not anymore. Unlike any other area of the game, Clan boss fight spends resource needed for it AFTER the fight is finished, not before (for quite some time).
So if your game crashes, fight is not finished and your key is retained as key is substracted from your account only after the fight. The only way you lost your key is if you clicked the "Leave battle" button yourself, leading to end of the battle and post battle screen.
However, it might be just individual bug, and it that case I can forward your issue to support if you give me your UID.