The GTD class are purpose built race cars but you do buy them from the manufacturer. It’s about half a mil for the car. It’s not street legal. Endurance race cars all have headlights and wipers. Even my little Spec Miata did. ?Real headlights, wipers and rain tires=real cars. No tube chassis!
What happens is they take a tub and modify it with a homologated cage. The cage is steel tubing and ties the front and rear subframes. The cage structure effectively makes it a tube frame race car even though it retains the floor of the unibody. The manufacturer then takes that package to the FIA and they homologate (approve) that exact config for use as a GT3 car. Then they sell it to old rich guys to drive.
Here’s the FIA specs for GT3 which is what the GTD cars are build against.
The GTLM cars are less spec and higher tech and don’t use any of the street car parts. The Ferrari Challenge and Lamborghini classes are largely production cars but have been race modified. They’d be the closest thing to production cars that run on those weekends.