I learned that for a bilinear form/square form the following theorem holds:
Matrices $A,B$ are congruent if and only if $A,B$ represent the same bilinear/quadratic form.
Now, suppose I have the following quadratic form $ q(x,y) = x^2 + 3xy + y^2 $.
Then, the matrix representing this quadratic form can be $ B = \pmatrix{1 & 3 \\ 0 & 1 } $ and also $ A = \pmatrix{1 & \frac{3}{2} \\ \frac{3}{2} & 1 } $.
I tried showing that $ A,B$ are congruent, meaning that there exists an invertible matrix $M $ such that $ A = M^T \cdot B \cdot M $ but such matrix $ M $ does not exist, here's the calculation for example:
$ M = \pmatrix{ a & b \\ c & d } $

And according to Wolfram:

Yet, $A,B$ represent the same quadratic form, but they are not congruent, so this is a contradiction to the theorem above.
Question:
How is this possible? These matrices should be congruent since they do represent the same quadratic form.
( I know that for every matrix $A$, $ \frac{1}{2}(A + A^T) $ is symmetric, but this doesn't answer why the above congruence fails to hold ).
I mean, the following holds: $ \pmatrix{ x & y } B\pmatrix{ x \\ y } = \pmatrix{ x & y } \pmatrix{1 & 3 \\ 0 & 1 } \pmatrix{ x \\ y } = \pmatrix{ x & y }\pmatrix{x + 3y \\ y } = x(x+3y) +y^2 = x^2 + 3xy + y^2 $
$ \pmatrix{ x & y } A\pmatrix{ x \\ y } = \pmatrix{ x & y } \pmatrix{1 & \frac{3}{2} \\ \frac{3}{2} & 1 } \pmatrix{ x \\ y } = \pmatrix{ x & y }\pmatrix{x + \frac{3}{2}y \\ \frac{3}{2}x+y } = x(x+\frac{3}{2}y) +y(\frac{3}{2}x+y) = x^2 + \frac{3}{2}xy + \frac{3}{2}yx + y^2 = x^2 +3xy+y^2 $
So $A,B$ represent the same quadratic form.
I know that the quadratic form has only a unique symmetric matrix that represents it, in this case it is $A$ but this still doesn't answer why the above congruence between $A,B$ fails to hold ( it should hold because they represent the same quadratic form )
Thanks in advance for help