It really depends. If your therapist is using this as a blanket statement, I'd start paying very close attention to how they handle other things. Anxiety can make SPD worse, and SPD can cause anxiety. But each case is unique and lots of different conditions can be linked to it or aggravate it (or vice versa). I find my ASPD gets worse if I'm anxious, but it never goes away—even when my anxiety is really well-managed. What *does* help it for me is regular gentle immersion to the thing that aggravates my senses (background noise).
Pre-COVID, learning to swim in lap lanes was an incredible help! It was the one time in my life that it felt like I was "cured." Unfortunately, it only helped as long as I was doing it. I've had SPD return during COVID when I did not swim. That said, I was exercising in many other ways and was handling my anxiety better than most of my friends and family to the point I was actually their rock. The exercise is wonderful for my anxiety (which I jokingly call mismanaged energy...or my athletic superpower), but I actually need repeated exposure to noise to be able to "hear" well in noise. I will be returning to swimming soon. While I do not feel anxious, I still have to deal with SPD. Luckily, I'm now equipped with self awareness. Finding LOOP earplugs has been magical for this transition.