Given any odd prime $p$ we can use Dirichlet to find another prime $q$ congruent to $1$ modulo $p$.  Then letting $n=pq$, we see that we can't improve the $\frac{n}{2}$ bound significantly for a product of two primes.

For a product of three primes e.g., $2pq$, we can do a little better because solving the problem for $n=pq$ automatically produces a solution for $2pq$ as well.