I had the same issues with the Hella nav lights as furnished on my 43 Legend. The case is prone to water intrusion and therefore (ongoing) corrosion issues. I solved the issue by replacing my nav lights with Hella NaviLED lights. Super bright, completely "hermetically sealed" and furnished with 1M leads so you can make your electrical connections inside the boat. Not cheap at about $140 each, but you will never have to fool with them again, as they have an estimated life of 10,00 hours.
Of note, they are made in New Zealand and are labeled with the correct USCG/COLREGS approval numbers. If you "cheap out" and buy the inexpensive Chinese nav lights as found on eBay be aware that they are NOT tested/inspected or USCG approved. If you were subsequently involved in a collision at sea, the accident investigation would reveal that your nav lights were out of compliance and you would likely be found liable by statute. Good luck.