Orthogonality of restricted primes with nilsequences