This also occurs on bedrock, see MCPE-186248. The main reason why this can be particularly problematic is that it can kill your pets if your build happens to have a skylight consisting of glass blocks. If the interior of your house is also made of wood, this could lead to it burning down, too.
Steps to reproduce:
Give yourself a trident and enchant it with channeling.
Set the weather to "thunder".
Build a glass platform and spawn any mob underneath it.
Hit the mob by throwing your trident.
Observed results:
Lightning will strike the mob, and may end up killing it.
Expected results:
Lightning should not be able to pass through glass blocks. This behavior is inconsistent with the likes of other transparent/translucent blocks.
I also tested creating a custom superflat world using only glass and lightning rods: my results were that the lightning struck the glass blocks, but not the rods, meaning that this is most likely limited to whenever a lightning bolt is looking for an entity to strike.