It's unclear where this idea came from. In theory, Supergirl doesn't have any obstacles to flying in space. As she is from Krypton, she stores solar energy and should be able to fly in space as her family members can.