Which is why the new engine doesn’t increase the value of the vehicle by much in non totaled condition. The engines are being replaced for free by Hyundai. I read that many of the engines are failing at 60 to 90k miles due to a manufacturing defect where metal shavings were not properly cleaned from the crankshafts.
A totaled car with new brakes, exhaust, tires, shocks, cv joints etc. or bad same items are not taken into consideration in my experience.