I have four compact wool farms, each of which features a sheep of a different color standing in a 1x1x2 area, completely enclosed with glass blocks, except for the bottom block which is obviously a grass/dirt block. The wool is collected by a hopper in a minecart underneath the grass block and moved into a chest. One day, I come back to the farm to find one of the sheep missing. I jumped around the glass blocks to make sure I hadn't forgotten to cover any sides which could potentially let the sheep escape. The 1x1x2 area where the sheep used to live was completely covered from all sides. Then I opened the chest. In it I found not only wool, but also two cooked mutton. This means my cheep has died of fire. So, what could have potentially killed my sheep?
I've had the following theories
Some mob spawned inside the 1x1x2 area where the sheep was. However, I find this unlikely because the glass block above the sheep has a torch placed on it, so the light level inside the enclosure is 12 or 13. I don't imagine any nether creatures spawning in the overworld which are the only ones that could kill something with fire.
Lightning? But then my sheep is enclosed in glass and under a roof. Glass protects from lightning, doesn't it? If it doesn't, and my sheep was in fact killed by a lightning bolt, how could one farm sheep safely? The reason I my roof is made of glass is that the wiki says that grass cannot grow under solid or light-blocking blocks and:
Grass can grow under all other transparent blocks, like glass, fences, torches, or pistons.
1.14.4,Java edition, Survival mode, Normal difficulty.