A vehicles alternator contains a diode that completes a charging circuit while the alternator is spinning and producing voltage.
The diode is supposed to close to complete the circuit and allow the vehicles battery to charge up while the vehicle is running.
When the diode fails to open up then the circuit stays on which allows the battery to drain while the vehicle is turned off and not running.
So if you've got a good battery and left nothing on inside your vehicle then it could be your alternator draining the battery due to a faulty diode.
An alternator can still test good as charging but can still be faulty due to a bad diode since a bad diode in an alternator is the most common failure of an alternator.
The diodes in an alternator are part of the rectifier assembly that converts the alternator's AC output to DC.
The alternator's charging output flows through six diodes in the rectifier assembly before it goes to the battery and electrical system.
So yes an alternator can be partly good but still cause a vehicles battery to drain due to the diodes failing.