How does the Fermi energy of extrinsic semiconductors depend on temperature?
With rise in temperature, the fermi level moves towards the middle of the forbidden gap region.
Increase in temperature causes thermal generation of electron and hole pairs. The free carrier electrons having high energy then move to the conduction band to occupy higher energy states which results in formation of holes in the valence band. Now for doped semiconductors (let us assume n-type one). The lower energy states of the conduction band are already occupied by donor electrons. Thus the band gap for newly generated thermal electrons is larger as they have to occupy higher energy states in the conduction band.
It may be a case where the number of thermal electrons is greater than donor electrons. Then, there will be large number of holes present in the valence band too. This will lead to charge neutrality within the semiconductor (amount of the donor electrons will not matter in that case). As now the semiconductor will contain equal amount of free electrons and holes the Fermi Level is move to the middle of the forbidden region indicating the charge neutrality.
Here is a calculation from the Ioffe Institute,