The resale value of the car, insurance (even if you don’t do pay per mile, insurance quotes are generally going to have some basis in miles driven per year), and maintenance are all directly correlated with miles driven. So, while these are often treated as sunk costs, that is due to improper accounting.
So, to reiterate, the cost of driving is much more than the cost of gas.