What is this plastic device inside the plane window?
I've found it on the 737, both the -800 and Max as far as I've looked. It's even noticeable from the outside.
The related patent from 2005 is US7267302B2 Window airflow damper. It solves an issue with severe window fogging. Basically it's a device that replaces the usual breather hole by putting the hole on top and covering it with a damper.
There is a blog post about it called New cabin window design &amp; installation:

A new cabin window assy has been introduced due to the fogging problems we all encounter on the 737NG’s. The new cabin window assy has a breather hole at the TOP, compared to the bottom vent hole at the BOTTOM on the old panes.
The new window assemblies use thicker outer panes, redesigned seals with integral stiffening ring, and an airflow damper over the middle pane vent hole (...)