Most of the time they wrongly show up in front of the plane.
Let's say that if we are at least 1000 ft from the plane then they could appear in front but XP should be programmed so that they always show up behind the plane.
Also these lightning always start somewhere in the environment but they should have a blend first with the clouds.
At the bottom (near the ground), it is rare that they touch the ground or a building.
A lot of things are wrong with lightnings.
In this example, it is totally unrealistic to have a lightning very far and visible as in this screenshot, but having a cloud ceiling so low.