Sieving the sequence $x^2-n$ to recognize b-smooth numbers
The statement "To factorize a number $n$ with the quadratic sieve, we are looking for a product of numbers $x^2−n$ giving a perfect square" is incorrect is only a subset of a possible more general definition: looking for a product of numbers $x^2-k\cdot n$ giving a perfect square (by restricting the numbers to be suitably smooth, factoring them, and using some equivalent of Gaussian elimination to form the product so that the multiplicity of every prime in its factorization is even). Introducing $k$ allows more freedom in the search (but is seldom used in practice).

The definition of QS used in reference [1] is identical to that in Wikipedia. It is looking for smooths of the form $x^2\bmod n$. That falls under the more general definition of QS that I give, since $x^2\bmod n$ is $x^2-k\cdot n$ with $k=\Big\lfloor{x^2\over n}\Big\rfloor$.

The issue encountered in the question is that the sieving algorithm used finds $x$ such that $x^2-n$ is smooth; but when $x$ exceeds $\sqrt{2n}$, that sieving algorithm no longer is sieving $x^2\bmod n$.

Options to fix this


Sieve only $x^2-n$, including when that exceeds $n$; and use $x^2-n$ rather than $x^2\bmod n$ everywhere else. Problem is, the density of suitable $x$ decreases as $x$ grows. Also, that's not an option for large $n$, since sieving even a fraction of $(\sqrt2-1)\sqrt n$ values is way too long.
Sieve only $x^2-n$, but use a larger factor base. That increases the number of relations to be found, but increases the number of smooths retained even more, so that the required number of relations will be reached sooner.
Sieve $x^2-k\cdot n$ for several values of $k$. For example: until there is enough smooth collected, and for $k$ from $1$ onward, sieve $x^2-k\cdot n$ for smooths, varying $x$ from $\Big\lceil\sqrt{k\cdot n}\Big\rceil$ to $\Big\lfloor\sqrt{k\cdot n+m}\Big\rfloor$ for some bound $m$. That matches reference [1] when the bound $m$ is set to $n$. That could be viewed as an overly naive Multiple Polynomial Quadratic Sieve.
Sieve integers of the form $(a\cdot x+b)^2-n$, with $(a,b)$ chosen appropriately, in particular such that $(a\cdot x+b)^2-n$ is divisible by $a$ (allowing $a$ as a factor, if it does not belong to the factor base). This is what actually used variants of the Multiple Polynomial Quadratic Sieve do. The multiple polynomials allows to remain in the region where the un-factored part of what's sieved is small, so that the rate of finding smooth does not become vanishingly small. One advantage compared to the previous solution is that the factor base used for sieving is the same for all the polynomials used, see this question.


There are several other, independent optimizations of QS; including:


Allow what's sieved to be negative, and include $p_0=-1$ in the factor base.
Actually factor $m\cdot N$ for some small $m$ chosen to optimize the yield of the factor base.