No, it is not ok to leave dead shrimp in the tank. Dead shrimp will start to decompose immediately, which will pollute the water and put the health of other tank inhabitants at risk.
Moreover, the dead shrimp might get eaten by the living shrimp. If the dead shrimp died of infections or parasites, it might pass the disease to their living friends.
You should only leave a dead shrimp in the tank if:
- The shrimp likely died of old age
- The shrimp colony is happy and healthy
- The shrimp colony is large enough to consume the entire corpse within a day
- The tank is large enough that the decomposing body won’t cause an ammonia spike