It will take a while before it is shrimp safe.
Do a huge water change. This will remove a lot of the medication.
Then run carbon in the tank. If there's no room in your filter the simplest thing is to buy a small, cheap internal filter and some carbon granules, and a mesh bag (you can make your own from net fabric). Put the carbon granules in the bag and wash under the tap as carbon granules are dusty. Replace the carbon every day for a week. Several small batches of carbon are better than one big one.
If you want to and don't mind the expense, you can then run some
PolyFilter in the filter. Note the capital letters, it is a specific filter medium which removes all sorts of things; it's not just filter wool. It's expensive, though.
If you have fake plants I would also remove them and any other decor and scrub them to remove anyhting attached to the surface as shrimps will graze micro-organisms from the biolfim which covers all surfaces and could be contaminated. Live plants are more difficult as you can't take them out and scrub them. If do you have live plants I would wait a couple of months before risking shrimps.
As an eBay Associate we earn from qualifying purchases.