There is no hot water inlet in a water heater. There is a cold inlet and a hot outlet. Yes it can be connected to the hot outlet depending on the jurisdiction. Check the plumbing codes in your area to be sure.
I think the only reasonable answer can be that the cold and hot water inlet/outlets are reversed. your hot water line is attached, at the heater to the cold water inlet or your hot water outlet is too short inside of the tank
Heat energy is transferred from the hot water to the cold.
You probably haven't re-opened the cold water inlet valve.
The cold water inlet valve to the water heater is closed.
Take cold inlet water pipe off tank. The dip tube sits below the fitting joining to the tank on the cold inlet side. You can pull it out and replace it.
Hook it up on the cold inlet side where you have room.
condensation
Someone hooked up the hot water supply to the toilet instead of the cold water supply- or your water heater is back drawing hot water through to the toilet from a cold water inlet (supply)
When hot water is added to cold water, heat energy is transferred from the hot water to the cold water through a process called conduction. This causes the temperature of the cold water to increase as it absorbs the heat energy from the hot water. The two temperatures eventually reach an equilibrium where they are at the same temperature.
Hot Approach: It is difference in temperature of hot fluid inlet temperature and cold fluid outlet temperature Cold Approach: It is difference in temperature of Hot fluid outlet temperature and cold fluid inlet temperature. Mohsin
The inlet valve is shut off on the cold water feed side or your mixing valve or tempering (if you have one has failed.