It does not melt in freezer because inside the fridge because in the fridge there is nitrogen which don't let the water defreeze
explained
Frost free refrigerators use a heating element to prevent frost from forming. In modern refrigerators, many energy-efficient models use some of the heat exchanger coils as the source of heat. This is often wrapped around the area where the door gasket meets the door opening. If you put your hand against the metal of the door frame while the compressor motor is running, you may feel the warm part.