ECDSA Verification - Last Steps
There are two different primes being used here.

Using your notation, $q$ should be the prime defining the field $\mathbb{F}_q$ over which the curve is defined.

$n$, instead, indicates the (prime) order of your generator $G$.

The coordinates of points, and therefore the computations of scalar multiplications and point addition, are done in $\mathbb{F}_q$.

So, your point $R$ will have coordinates $\bmod q$. But you still need to apply the modular reduction with respect to $n$ to $x_R$ in order to make verification work. 
This is because the $r$-part of the signature is also computed $\bmod n$ and $n$ is allowed to be smaller than $q$.