Mechanical transmission are in the high 90's percent efficient at highway speed, almost no losses.
Diesel Electric transmissions in trains are in the 80's percent efficient range, double conversion from mechanical to electrical back to mechanical has higher losses. Trains make up for this with lower rolling and aero resistance, they need the precise traction control of the electric transmission to prevent wheel slip along with the impracticality of mechanically routing power to the wheels. Semis do not have this issue.