This could be a sensor issue. These are attached to the center upper portion of the windshield. An electrical test is required and a good Mercedes scanner would help a lot.Use this link to find a good shop near you.
https://repairpal.com/repair-shops
Alex
RepairPal Certified shops can diagnose and repair your 2005 Mercedes-Benz SL500. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.