Converting PWM to Constant DC for Power Applications
As other have noted, your 7812 regulator cannot maintain regulation as its input voltage is too low. However, your circuit does not need to run off of 12 V and can run just as well from a lower voltage, provided the FET gate is driven with a high-enough Vgs to turn it on.

Therefore I recommend you change your 12 V regulator to an 8 V regulator. The standard 7808 regulator has a minimum input voltage of 10 V, which should be OK. However, the LM2940T-8.0/NOPB-ND runs from 8.5 V min. which should give you plenty of headroom and is just as readily available. Add a 47 uF capacitor in parallel with C2 so there is plenty of decoupled 8 V supply for when the 555 and FET gate switch.

If you still get any odd effects when on charge, put a 1N4001 diode in between your 12 V input connector and the C1/IC1. If there is excessive ripple on the supply during charging, this will keep C1 charged to near the peaks of the input voltage and stop the regulator seeing the troughs. Because your load is so small, the 47 uF capacitors on the regulator input and output should be plenty of hold-up for this rail.