Inverters are pretty expensive too. And you have to remember those combined with the battery merely replace a gas tank that probably cost less than 10 bucks to make.
But then the electric motor is probably cheaper to make than a combustion engine. Also the heavier weight of a BEV car makes brakes and suspension more expensive.
But despite all that, I think that BEV cars are actually mostly at the level of ICE car prices now. Especially if you compare in the 400-500 hp AWD range.