First, these bikes use what is referred to as a "battery ignition" not a "magneto ignition" and so the battery must be in place to complete the circuit.
Charging ok at low rpms and not at high rpms indicates a possible fault with the regulator. The best thing to do is check the entire charging/electrical system including wiring harness connections which get dirty over time. If you have a manual, it describes how to messure the resistance of the generator and field coils, how to test the rectifier and how to set the regulator. Have fun.