Dottybacks r known to Attack shrimps if I'm not wrong. However, I managed to keep both of them together in my 1 ft tank last time by adding the fish only after the shrimp resided in the tank for a few weeks.
I believe Personality and size of the fish do play a part too..
Sent from my iPhone using Tapatalk