Glass keeps things hotter the plastic would melt or burst.
Normally Plastic keeps liquids hotter for a longer period of time. This is because Plastic is a better insulator and heat can not pass through it. So when we keep something hot in a plastic container, it stays hot for a longer period of time.