No, take $S=[-2,2]\times[-2,2]$ and $F$ the closure of the graph of $[-2,2]\setminus\{0\}\ni x\mapsto \sin(1/x)$.
$$*$$
However, it is true that there is a connected component of $F$ that meets both the (closed) edges $B$ and $D.$ Equivalently, there is a connected component of the set $G:=F\cup B\cup D$ that contains both $B$ and $D.$ Suppose not, by contradiction. Then, the same holds for some open neighborhood $V$ of $G$ in $S$ (this is easily shown recalling that a nested intersection of connected compacta is a connected compact). This amounts to saying that the edges $B$ and $D$ have disjoint open nbds, resp, $U_B$and $U_D$ whose union is $V$. The assumption that $S\setminus F$ contains no paths connecting $A$ and $B$ implies that the edges $A$ and $B$ also have disjoint open nbd $U_A$ resp., $U_C$, whose union is $S\setminus F.$ In conclusion, we have covered the square with four nbds of the edges, in such a way that nbds of opposite edges do not meet. This leads to a contradiction. Consider a partition of unity subordinate to the covering $\{U_A, U_B, U_C, U_D\},$ and use it to define a vector field $X$ on $S$ such that on $U_i\cap U_j$ the field $F$ is a convex combination of the exterior normal to $U_i$ and the exterior normal to $U_j$. This implies that $X$ has topological degree $1$ w.r.to zero, and never vanishes, a contradiction. Otherwise, you may use $X$ to retract the square on its boundary, another contradiction.