They’ll be fine in the prefilter!
Just pour the water into a jug when you clean it and fish the shrimp out!
So confession time: the last time I cleaned the pre-filter a full grown shrimp had got sucked in. I had no idea this was possible -the gaps in the glassware looked so narrow. I was rinsing the sponges and I spotted it, a millisecond too late, swirling down the kitchen sink plug hole. After a minor freak out I grabbed a sieve, ran outside and placed it under the drain pipe. Then I ran back in, turned on the tap and managed to flush it through the sink pipe and into the sieve. Was still wriggling so I just ran straight to the tank and plopped it back in. It just swam off and was right as a bobbin! I was too embarrassed to mention it here, especially after my Rasbora suicide. I’ll definitely be double- checking the sponges from now on