But long after the original rear-engine design was discontinued in the US, they made them in Mexico for the domestic market there. They wouldn't pass crash standards and thus were illegal to import into the US (although people periodically tried, and I suspect if you were even slightly cagey about it, you could have made it work using an old hulk's VIN; there are certainly enough of them around in junkyards).
The last ones were made in late 2003, so they actually overlapped the production of the "New Beetle" by several years.
Interestingly, a decree prohibiting the issuance of taxi permits to 2-door vehicles reportedly contributed to the decline in sales, which shows you the role of government in killing off older products. They might still be made if not for that, just for the Mexico City taxi market.
[1] The capital has super strict emission verification requirements on account of being in a former lake basin surrounded by mountains and boasting a 20-30 million population depending how you count...