Recently i had many experience of construct taking 0 damage from Ekko lightning attacks and epic procs. I checked and said construct did not have the lightning immune trait.
Also the text lightning immune comes up upon taking lightning damage even after making sure they have no trait that dictates that it should. The text also appears to be in green with a nature icon at the end as poison or nature resistance notifications should. But not lightning.
And as clarification i talk about damage like Ekko's epics proc not the status effect shock. Constructs are rightfully immune to the status effect but not the damage type lightning itself.