To supplement the answers that were posted earlier, here's an explicit example from ref 1. This example proves that $A$ is not always uniquely determined by $F$, not even up to gauge transformations, not even locally.
Work in four-dimensional spacetime with coordinates $(w,x,y,z)$, and take the structure group to be $SU(2)$. Let $T_1$, $T_2$, $T_3$ be the generators of $SU(2)$, and remember that the only element of $SU(2)$ that commutes with all of the $T_k$ is the identity element. Consider the gauge potential
$$
A = T_1 w\,dx + T_2 y\,dz + \alpha T_1\,dz
$$
where $\alpha$ is an arbitrary nonzero real number. The field strength is $F=dA+A\wedge A$ with
\begin{align}
dA
&= T_1 dw\wedge dx + T_2 dy\wedge dz
\\
A\wedge A
&= [T_1,T_2]w y\,dx\wedge dz
\\
&\propto T_3 w y\,dx\wedge dz.
\end{align}
Observe:
$F$ is independent of $\alpha$, so we have a family of gauge different potentials that all give the same $F$.
The three two-forms appearing in these expressions for $dA$ and $A\wedge A$ are linearly independent, and their coefficients are the three different generators of $SU(2)$.
Now, consider whether or not these potentials can be gauge-equivalent to each other (equal to each other up to gauge transformations). When we apply a gauge transform $g$ to $A$, its effect on $F$ is $F\to g^{-1} Fg$. But we already know that all of these $A$s give the same $F$, so we must have $g^{-1} F g=F$. Thanks to the observations highlighted above, this implies $g^{-1} T_k g=T_k$ for all $k$, which in turn implies $g=1$. Therefore, the potentials $A$ with different values of the coefficient $\alpha$ cannot be gauge-equivalent to each other, even though they all have the same field strength $F$.
Reference:
- Mostow and Shnider (1983), "Counterexamples to Some Results on the Existence of Field Copies" (https://projecteuclid.org/euclid.cmp/1103940415)