The effects of being Frightened are as follows:
A frightened creature has disadvantage on ability checks and attack rolls while the source of its fear is within line of sight.
The creature can't willingly move closer to the source of its fear.
Does this give a Frightened creature any extra knowledge of the location of that source?
More specifically:
A player is Frightened of a dragon, and has run into a location with two exits and no vision of the dragon. The dragon has since moved and Hidden from them, and could potentially be lurking close to either of the two exits.
The player tries to run towards the exit that, unknown to them, the dragon is lurking near. What happens?
The player is not "willingly" moving closer to the dragon, they are unknowingly doing so. They can keep moving closer to the dragon up until they become aware of the dragon's location.
Moving towards the dragon (even unknowingly) would be "willingly" moving closer to the dragon (here "unwilling" would be "dragged by someone else's magic" or similar). Therefore, they find themselves unable to move in that direction, and may well be able to deduce it is because the dragon's location is in that direction.
Something else.