Check and clean the 2pin connector carefully. Replace if needed. That connector is the sense circuit, one wire runs as directly to the battery as possible, the other goes through fuses, dash circuit, through the dash battery lamp. Oldschool subarus have a light bulb for the battery for resistance and the charging circuit depends on that. The alternator uses the voltage differential between two wires to regulate power. If the connector is dirty or wires are corroded, the extra resistance will force more voltage.
Yeah and unplugging it completely disables the charging so the lights turn off. No computer involved. The light turns on if there's a big enough voltage differential.
No idea how newer ones work, they have leds and digital gauges.