In the doc, F can be any direction. It’s simply where the enemy looks at. In this example, dot product allows you to tell how good B can see A, assuming there is no obstacle in the level. Good ol’ vector math
If B is a Node2D (or any subtype of it), and is designed so that its sprite looks on the right, you can get F like this:
var F = B.get_global_transform().x
If B’s sprite is designed to look down:
var F = B.get_global_transform().y
(Note that the 2D engine Y axis is pointing down, not up)