Will gas fees be deducted even if my transaction fails on the blockchain?

Updated