The city car segment has been shrinking for years as manufacturers have struggled to make decent profits from vehicles that are regulated just the same as a Range Rover or BMW 7 Series.
The problem has been compounded by the move to electrification because the cost of the battery is even harder to mask in something sub-4.0m long. You could reduce the size of the battery, but buyers might not accept the paucity of range.