The transaction will consume Gas as long as it is packed by miners. However due to failed packaging or failed blockchain confirmation (including lack of Gas fee, call the wrong contract method) will cause to consume fee and return the transfer amount.