It’s actually pretty simple and I’m quite surprised they haven’t implemented this already.
All you have to do is use polarized glass.
Lasers are intense because they are highly polarized. If you have a single polarized layer of glass within the windshield, the laser would have to held at the precise angle of polarization to pass through. Would not be easy to do.
If it’s still a problem, you can use two layers, with polarization at right angles. This should also account for lasers with partial polarization.
Polarized films in sunglasses are dark, but the darkness is not required for polarization. I remember my physics lab using absolutely clear polarized lenses that stopped laser light. The laser only passes through if you orient it in the appropriate position.
Re polarization: The amount of polarized light transmitted through a polarizer varies with the cosine of the angle between the polarized light and the polazrizer orientation. You do not get a deep null unless they are exactly perpendicular to each other. Most of the time, roughly 50% will come through, since the relative orientation will be random.
The reason polarized sunglasses are good for glare is that the reflections from snow or water tend to be predominantly horizontally polarized, while the glasses are oriented with vertical polarization, and the perpendicularity condition is met.
That will block out ALL of the light, leaving the pilot blind to the entire spectrum.