A rough example. Moving closer costs 100K more, working for 200 days a year, less commuting provides 1.5 hours more time per day, same client (place of work) for five years. Cost of hour of free time is (/ 100000 200 1.5 5) = 66.7 units of money per hour.
Worth it? Don't think so.
Working remotely is often impossible because of security policies and also not the same in terms of presence.
I used numbers that are reality to me. Plug-in your own numbers for comparison.
For a 10 minute commute today, I would have pitch in another 100K for living. My experience at the moment is working 5 years for same client/location on average.
P.S. If I move out I can reclaim some of that 100K, some go to tax, fluctuating prices, I don't calculate inconvenience of moving and stressful location etc. details.