With an increase in temperature, maintaining Mach Number, your TAS will have to increase and the air density will decrease. Your Specific Air Range (SAR) will decrease (your fuel economy will become worse.) The question the optimum altitude calculation is asking is: can this situation be improved by changing Flight Level?
The drag profile of the aircraft is based on your Mach Number/IAS (OK, EAS) and this relationship will not change with temperature, so changing Flight Level will not improve the situation, hence the Optimum Altitude doesn't change (things are worse with the increasing temperature, but won't be improved by changing Flight Level.)