Car stereo not working right in cold weather

Generally stereos have two power wires going to them. One cuts off as you say when the engine turns off. The other is a constant-power wire that keeps power going even when the engine is off so that it can store your radio presets, EQ settings, etc. It’s not unheard of for the constant power and the switched power circuits to get bridged, making the constant power wire also power (or sometimes partially power) the switched side.