Consider the functions $x$ and $x^2$ on $\mathbb{R}$. Clearly, they are linearly independent.
But consider the following argument.
Consider the matrix $$A = \begin{bmatrix} x & x^2\\ 0 & 0\\ \end{bmatrix}$$
Clearly, the determinant is zero. This implies the existence of a nonzero matrix, $$B =\begin{bmatrix} a\\ b\\ \end{bmatrix}$$ such that $$AB=0$$.
This implies that $ax+bx^2=0$ for some nonzero $a$ or some nonzero $b$. But this implies that $x$ and $x^2$ are linearly dependent.
Clearly, false.
Where’s the flaw?
They are linearly independent as functions of variable $x$. Yes, you are right that given a specific value of $x$ you can find non-zero $a,b\in\mathbb{R}$ such that $ax+bx^2=0$. But you will never find non-zero $a,b$ which will work for all $x\in\mathbb{R}$.