Can't. Regardless of whether it is Bitcoin or Ethereum, unconfirmed transactions may be cancelled, or transactions may fail for other reasons. Therefore, for Bitcoin, it is recommended to trust transactions with at least 2 or more confirmations, while Ethereum trusts transactions with at least 10 or more confirmations.