Yes, and no. Nuclear blasts don't travel well in space. There isn't much medium to travel through. So you're not vaporizing a giant number of satellites; space is big.
The main concern of a nuclear ASAT effort is the EMP and the cloud of radiation that gets produced hanging out there a la Starfish Prime. This effect is agnostic. It doesn't care if your own satellites enter the area. It doesn't differentiate between friends and foes. Since we outlawed testing in space, we have a good idea of effects based on earlier tests, but it will be fairly hard to predict the nuclear ASAT resulting radiation (where it gets trapped, how strong, how long) with great accuracy. So you've got to find the use case that doesn't care if you disable your own satellites. Not something you casually lob up there, especially in great numbers.
Detonating a nuke ASAT will probably produce a small effect here on the surface. So it needs to be not near yourself preferably, and detonating an EMP device over another country (even in space) is as close to asking for a nuclear exchange as you can get beyond launching an ICBM
The main result of a nuclear ASAT is a bunch of satellites that get damaged either permanently or temporarily. Including any of yours that happen to travel through the new artificial radiation belt.
Space hardware already has some level of hardening against radiation. There are methods to improve this.
They revised MIL-STD 461 a few years ago, and you can be sure that the new hardware (and quite a few of the older ones) are hardened to the degree possible beyond the spec.
You'd probably get a faster nuclear response/escalation to a single nuclear ASAT attack than you would to a single tactical device in eastern Europe. If that's the game people decide to play, everybody loses.