Q. I have all sorts of electrical problems with my bike. When the lights are on the battery seems to lose charge even when the engine is running.
A. You don't say what happens with the lights off. If it's fine with the lights off, and if the headlight bulb is standard then the trouble is probably down to the contacts within the light switch that increase the charge to the battery when the lights are on.
These often corrode. Sometimes they give up completely.
You can bypass them if you want, but as the generator will then be on full output permanently you'll have to check the battery fluid level more often.
To check the battery is charging put your multimeter, on a range suitable for reading 10 to 20 volts dc, across the battery.
Note the reading. Start the engine. Note the reading at 1500rpm. Switch the lights on. Note the reading (1500rpm). Provided the readings at 1500rpm are at least as high as the reading with the ignition off, then the alternator and rectifier are working adequately well.
There could also be some sort of defect with the pulser (also called the trigger or sender) coils. These can fail as they heat up, then work again once they've cooled.
I presume you have a wiring diagram? There is a possibility that there is a fault in the wiring harness. Wire the bike up with some new wire using the barest essential system for the ignition circuit.
Don't go through the ignition switch or any of the cutout switches, but do make sure that you have a method of stopping the engine such as a terminal that can be pulled apart or off.
If the bike now behaves itself, you can then go through the wiring harness adding switches and parts of the loom until the problem reappears. By a process of elimination you can find the fault.