Perhaps the laser was just a rangefinder. Perhaps it was designed to dazzle sensors. It might even be something that went on inadvertently, or automatically.
“The laser appeared to be part of the destroyer’s close-in weapon system, a PACFLEET spokeswoman told Insider.
“The laser, which was not visible to the naked eye, was captured by a sensor onboard the P-8A,” PACLFEET said.”
There was one time during the Cold War when a Soviet trawler (AGI, festooned with antennae rather than fishing nets) dazzled a US Navy helicopter pilot just of the coast of Washington state (likely snooping for signals from Bangor).
Sounds like an Nd-YAG laser. They are used for range finding and target acquisition.