Diet and too hard of water are probably contributing this, but changing parameters seems to be the biggest factor in my own aquariums. When I was doing 50% water changes on my high tech tanks, I had a few shrimp perish from this regularly in both of my injected tanks. Once I slowed down the ferts and water changes, I rarely spot one since. But interestingly, I recently did planaria treatment and had to water change the meds out and what do you know? I've spotted some more. Though I'm at 120ish TDS and 2 dKH/6-7 GH, and with softer water probably have more leeway. You don't get much more anecdotal than this, but I'm getting pretty convinced that adding change water and topping off slowly (via drip) and performing much smaller changes is vital.
Nothing good happens fast in an ecosystem.