The flight deck windows are coated with a metalised film to combat UV light at altitude. The windows may also incorporate a thin film or wire grid heating system to combat icing. The windows will also be electrically bonded to the airframe. From a radio wave point of view, the windows might as well be a solid metal sheet.
You are attempting to receive very weak GPS signals from what amounts to the inside of a Faraday cage. Hence your device cannot work without connecting it to an external antenna mounted outside the shielded area or on the outer skin of the aircraft.