Transactions can fail for all kinds of reasons: insufficient balance, invalid logic, a bad signature…
On Algorand, invalid transactions are rejected before they ever reach the chain, so you don't pay for a transaction that doesn't execute.
Your $1 stays $1.