And also, depending on the crime (and acknowledging it is easier in some cases than others), countries have often agreed to prosecute the diplomat in their home country.
There's also the fact that Diplomatic Immunity is also a lot narrower than people think. Consular Officers are generally not covered by it, but then you get in to the de facto. Okay, NYPD sees consular plates and doesn't ticket a vehicle. Or tickets it but there's no enforcement, because "maybe it's the Ambassador's vehicle". And then a city, state or country is generally not going to make a scene that affects ambassadorial relations over a few hundred, or thousand, dollars of parking tickets.