Found the cause already... the shrimp were somehow going through the intake of the hang-on back filter that was sitting on the tank. I don't know how they could fit through the holes in the intake, because they were twice as big as the intake holes, but they managed it.
It turns out the first shrimp got shredded by the filter motor. That must have sucked. The second one I found eating from the filter cartridge. After I put the second shrimp into the tank, it immediately started hiding. I guess it just got traumatized or something.
I found a piece of netting lying around and I just put it around the intake so nothing like that happens again...
I'm happy I figured that one out because I was just about to go and get some more shrimp and I didn't want the same problem to hurt them in any way.