As you noted, the problem is that the government bought debt, not equity, so they don't share in the upside that would make this a financial home run that makes up for other failures.
That being said, the government isn't in this to make money, they're in it for the broader benefits that will spillover outside of the individual company receiving financing. In that sense the VC analogy could work, because a major successful electric car company in the US probably would be a "home run" for the country (and the world) on several dimensions, more than making up for losses on the way.