There is not an increased chance of getting hit by lightning if you are near a window.
The reason you are supposed to stay away from windows is because the glass could shatter and send pieces flying in all directions.
A lightning bolt would explode the glass window before it would travel through the glass.
Storm lightning is so fast that even if it were to hit a window, the window would shatter from the heat and speed.
Also glass is not a conductor so being struck by lightning through the window would take the glass being shattered first and then you could be struck by lightning but this would require two strikes.
More than one strike hitting the same place is possible but very unlikely.
People have a better chance of being struck by lightning in the home near something that is a conductor of electricity.
The following ways are the only way lighting can strike into a home. -Lightning can enter the home through any of the 3 following ways. (1) a direct strike (2) through wires or pipes that extend outside the structure (3) through the ground.
Regardless of the method of entrance, once in a structure, the lightning can travel through the electrical, phone, plumbing, and radio/television reception systems.
Lightning can also travel through any metal wires or bars in concrete walls or flooring. Avoid contact with concrete walls which may contain metal reinforcing bars. Avoid washers and dryers since they not only have contacts with the plumbing and electrical systems, but also contain an electrical path to the outside through the dryer vent.