Knees are simple “hinge joints." To sit appropriately in Hero Pose you must focus on an inside rotation of your femur head, which comes from the “ball and socket” joint of your hip.
Highly developed yoga https://youtu.be/dGOw_Oe9jQg?si=1VrmLuOBzrkUA3sK