Answer: It is an ideal concept and in practice, the temperature does vary because of heat transfer.
Then you might say the efficiency should also vary along the process as the temperature is varying. For practical purposes we do not use absolute temperature values to calculate efficiency rather we take the ratio of work output and heat input to calculate efficiency.
We use absolute temperature values only in the case of ideal cycles like the Carnot cycle which is a hypothetical/ideal cycle.