I don't see how you could have a voltage surge when running the generator that would affect the masthead lamps.
The generator produces 220VAC that powers the battery chargers which are connected to your big house bank of batteries. The generator has no other connection to the 24VDC system.
The chargers slowly raise the voltage of the batteries to the absorption voltage which is maintained for a while and then dropped slowly to a stabilised float voltage.
That bank of batteries has to be the biggest voltage stabiliser ever.
Unless there is something seriously wrong with your battery chargers, how can you get a voltage surge?