You must wire it up as per the wiring diagram only.
Normally it's:
Yellow to the battery (constant 12v - non switched).
Red to 12v controlled by the ignition switch.
Black to chassis/battery ground
Please check your diagrams and wire accordingly.
Having the Red cable running to the battery unswitched will drain your battery faster than usual.