Nice job.. often these things go unidentified.
I’d get the (likely bathroom caulk) stuff off there and see what you are working with. What I’d probably use would depend on the size of the hole.. smaller cracks and holes down to silicon RTV, larger stuff may need a caulk or a patch made out of plastic sheet then RTVd into place. Either way prepping the surface that will have sealant under it is important.
I mention RTV because it’s easy to work with and remove later if needed, but should stick pretty well to the headlight with good surface prep. Others may have better suggestions though..
Also make sure you flex the plastic around the hole trying to find additional cracks in the existing material. Sometimes cracks can form but the plastic not completely break away, and these areas could still leak if not caught while you do the repair.
And, definitely open everything up on that assembly to let it dry as much as possible. I have an old cpap machine I got on CL for drying out my MSR dromedary bags, works well for things like this as well. Just moves a bunch of air to wherever I put the hose.