The case of bilinear forms is taken care of by:
Proposition (Bourbaki, Lie Groups and Algebras, ch. VIII § 7 no. 5 prop. 12):
Let $k$ be a field of characteristic $0$, $\mathfrak g$ a split semisimple $k$-Lie algebra (with a fixed choice of CSA and simple roots), $V = V(\lambda)$ a simple $\mathfrak g$-module of highest weight $\lambda$ (each simple $\mathfrak g$-module is of this form).
Then the space of all $\mathfrak g$-invariant bilinear forms on $V$ has dimension $0$ or $1$; meaning that either the only such form is $0$ (case I), or there is up to scaling exactly one non-zero one. If this is the case, this unique one up to scaling is non-degenerate, and either symmetric (case II) or alternating (case III).
Case I happens if and only if $V$ and its dual $V^*$ are not isomorphic as $\mathfrak g$-modules, if and only if $w_0(\lambda) \neq -\lambda$ where $w_0$ is the longest element of the Weyl group.
Case II happens if and only if $V \simeq V^*$ as $\mathfrak g$-modules, and a certain invariant $c(\lambda)$ is even.
Case III happens if and only if $V \simeq V^*$ as $\mathfrak g$-modules, and the invariant $c(\lambda)$ is odd.
Where that invariant $c(\lambda)$ can e.g. be defined as twice the sum of coefficients of $\lambda$ written in the chosen root basis $\Delta$,
$$c(\lambda) := 2 \cdot \sum c_\alpha \text{ where } \lambda = \sum_{\alpha \in \Delta} c_\alpha \alpha$$
(The $2$ is there to make the invariant an integer, matching the math convention in enumerating highest weights e.g. of $\mathfrak{sl}_2$ by integers.)
The basic idea of the proof is to realize that the space of $\mathfrak g$-invariant bilinear forms on $V$, via typical duality concepts (https://math.stackexchange.com/a/3781591/96384, https://math.stackexchange.com/a/3701479/96384) identifies with the space of $\mathfrak g$-module homomomorphisms $Hom_{\mathfrak g}(V, V^*)$. Now use that $V$ is simple, and a strengthened version of Schur's Lemma (proved a little earlier in Bourbaki) which says that in the case at hand, indeed $Hom_{\mathfrak g}(V,V) \simeq k$ (not just some skew field extension of $k$). From this follows the "dimension zero or one" assertion, and non-degeneracy in the latter case, which in turn implies via a proportionality of $B(x,y)$ with $B(y,x)$ that the form must be either alternating or symmetric. The final distinction with the invariant between these cases II and III is a bit more subtle, but follows from consideration of certain subsets of the root spaces.
You'll notice that the whole case distinction is similar to the one of complex versus real versus quaternionic representations. That is of course no coincidence. In the case that $\mathfrak g$ is a compact real semisimple Lie algebra, we have a perfect analogue of the above in Bourbaki loc.cit. ch. IX no. 2 prop. 1 (cited e.g. in https://math.stackexchange.com/a/2774741/96384 and https://math.stackexchange.com/a/4026224/96384), and the proof relies on the above, together with the striking fact that in this (compact!) case, complex conjugation operates (just like dualizing) via that Weyl group element $-w_0$. I.e. where in the above one wrote the dual $V^*$, one now writes the conjugate $\overline V$, and things go through. In Appendix II of this chapter IX of Bourbaki, it is also alluded to how to translate between (non-degenerate) bilinear forms and ("separating" = non-degenerate) hermitian sesquilinear forms. It is not stated explicitly there, but it seems to me that that translation entails analogous uniqueness results for the hermitian forms.