The Force isn’t passed down through blood relations.
Rather, it is faith alone that allows a person to gain power in the Force. Allowing Luke to assume that Force ability is passed down from his powerful Jedi father is merely a sneaky method that Obi-wan uses to jump-start Luke’s abilities. Notice that there is no obvious sign of Force sensitivity in Luke other than being a good pilot until the events of ANH.
Similarly, when it appears that Luke will be killed in a foolish quest to save his friends, Yoda implies to Obi-wan that they hedge their bets with a new Skywalker, one invented from whole cloth. Yoda tells Luke that there is another Skywalker, and Obi-wan feeds the lie by suggesting that it is a twin sister, and Luke fills in the rest with his own now certain belief. It is Luke’s belief that Leia is related to him, already knowing that she was adopted, which will allow her to gain certainty in Force abilities that were nonexistent until the blood relationship was invented.