It's for the window heat. There is no sensor for an open cockpit window. I guess Boeing figured you would hopefully know if the window was open and wouldn't need a caution light.
I think they put a stencil on the window frame in big letters.. WINDOW IS OPEN! 😁