It rotates itself in 23 hours and 56 minutes relative to the fixed stars. It rotates itself in 24 hours relative to the Sun. It is Earth's rotation relative to the Sun what people care about in most situations, because day and night depend on that, not on the position relative to some far-away stars.
24 hours is an average over the duration of the Earth's orbit around the sun.
Seems like a problem to be solved with more rockets!