The layoffs come as car company is trying to reposition itself as a leader in electric vehicles and software, which are both costly. GM is aiming to cut $2 bn to $4 bn in losses on EVs next year