They actually dominated the match, they were leading in the total shot attempts and they won the ball possessions. Unfortunately, they only can get a score from a penalty shot. The worse situation, Kane failed to score in the second penalty kick.
It's not just "lucky factor".
Every time England start a competition as if they are the super favorites, [an example was in the last europeans of 2020 in which they lost (at home) against italy] but they haven't won an international competition since 1966!
Among other things penalties are always a negative point in their performance... also in 2020 they lost for the same reason.
France is a much more "compact and well-known" team.
no surprise they arrived at this stage even during this competition.