Check the points cover gasket for water leaks. I made one from neoprene 20-30 years ago and that cured my power loss in the rain issues.
If the coils/leads have obvious cracks, seal those up with RTV
If you are losing cylinders while riding in the rain and it slowly clears when stopped, re-route the carb overflow tubes and or vent lines that run down between engine and swing arm. One member reported shortening those cure is rain issues.
If either the drain lines or the top vent line ends get into differential pressure areas, water can be drawn into the carb bowls, causing cylinders to drop out. The main jet feeds from the bottom of the bowl and the pilot jet feeds closer to the top of the fuel level. Water is heavier and sinks the bottom of the bowl, making idle ok and power on runs problematic.