That's not necessarily the case - the Bombardier IPEMU demonstrator train used lithium iron magnesium phosphate cells. There was a concern about the safety of lithium ion batteries, of the type Tesla and others use in cars, and there was also a concern about the duty cycle, depth of discharge and life expectancy of more conventional lithium ion batteries. The ability for the battery packs to harvest/store as much energy as possible from regenerative braking was a particular issue and that too played into the selection of batteries. The IPEMU team looked at several technologies and conducted bench testing on a molten sodium nickel salt battery pack before choosing the lithium iron magnesium phosphate cells.
The battery technologies the Bombardier IPEMU team investigated and used were readily available, off-the-shelf products, but they are still not the most inexpensive of products. Transport Scotland are still reporting a premium of 25% over the cost of a standard 25kV AC EMU which someone somewhere is going to have to pay for during procurement and then through the leasing arrangements.
Hydrogen trains are more extensive still, Alstom's Coradia iLint 2 carriage units for RMV in Germany are costing €500m for 27 x 2 carriage units with 25 years of maintenance and supply of hydrogen. There are additional subsidies and grant aid from the German federal government and the state authorities, but the headline cost is €9.2m per vehicle which compares somewhat unfavourably with the initial £7.5m per vehicle for the first tranche of IEP vehicles and £4.4m per vehicle for the second tranche, both of which include maintenance for 27.5 years. The Class 385 fleet with 10 years of maintenance work out around £2m per vehicle, for comparison, though that does make use of the IEP investment in Craigentinny to reduce the maintenance investment costs for the ScotRail contract. If you add the £20m of investment into Craigentinny to the Class 385 order, it only adds £100k per vehicle.
I don't know the precise number of independently powered vehicles ScotRail will ultimately need, but assuming maybe 150 vehicles being needed across the West Highland, Far North, Kyle and Stranraer lines, a standard EMU order with some maintenance included would be around £400m, battery units with some maintenance would be around £500m and hydrogen units with maintenance and refuelling infrastructure included could be getting on towards maybe £1bn (which which I'm working out at £6.5m per vehicle cost to try and bring maintenance costs more in line with existing EMU order maintenance agreements). That ultimately will mean someone (i.e the Scottish Government, ScotRail and the Scottish passengers) will be having to cover that additional £500m to £600m over a 25 to 30 year period (plus around 3.5% interest per annum to cover the borrowing costs involved with the rolling stock company).
What I would caution with those numbers is there's a reasonable amount of guess work, and there's also no way to know how much cheaper hydrogen rolling stock will become between now and the time at which this fleet is ordered by Transport Scotland/ScotRail.
However, on current sums and all currently available data, I don't think Scotland can't afford to stop electrification at Girvan, Craigendoran, Inverness and Nairn.