Should have gotten the much more common version which has hand crank windows, non-powered seats, etc. Seriously, though, this does sound like the kind of electrical “gremlins” you get on a car which has been under water, or which had a serious accident in the past.
Well there certainly haven’t been any flood/collision damage in the time I have owned the vehicle. The previous owner never said anything about it either, so I’m not too sure either way. That said it has had weird electronic issues pretty much since I’ve owned it. I also thought the weird problems were gone when I replaced the alternator, but then they came back it seems (or at least the one instance I mentioned in the original post did).
Luckily, folks selling used cars never lie or conceal information.
That leads me to think that it did have either a flooding or collision problem before you bought it. As to the alternator, I would suggest that you have it tested. It is not unheard of for new or nearly-new aftermarket alternators to be defective.
The problem may be in the master window switch. There is a wire to the window switch that powers the light inside the window switches when the headlights are on. Disconnect the yellow wire (cavity # 4) from the master window switch and see if the problem goes away.