The silicone sealants that are intended for bathroom applications have used an arsenic-containing mildewicide for obvious reasons and although I'm not entirely sure about this, it's also likely a similar mildewicide is used in the silicone intended for outdoor use for the same basic reason. However, most silicone sealants intended for sealing window and door applications do not include a mildewicide. These are the ones that can be safely used in aquarium sealing.
To your question regarding how long the leaching of arsenic salts from the cured sealant can have a deleterious effect on fish, like all things it will depend upon several factors but my understanding is that the leaching occurs progressively. As you can imagine, in the intended applications (like bathrooms) it's advantageous to have mildew protection over a protratcted time period so the sealant doesn't allow mildew and mold to quickly develop on it. And, the way typical mildewicides are effective is through migrating from the bulk of the sealant to the outer cured surface. I doubt that anyone has generated data with respect to how long and in what concentrations the arsenic remains in the water and can affect fish. It likely takes very little amounts of arsenic to kill organisms - that's why it's used to control mildew and mold.
It's best to use only aquarium grade silicone sealants as a rule. I've never attempted, nor happened to accidently use mildewicide-containing silicone sealant so I hesitate to offer remedial suggestions. I suppose some things might work but removing the inappropriate types of silicone sealants from a tank and being scrupulous about getting it ALL out and then replacing it with silicone sealant that does not contain arsenic salts to control mold and mildew. GE Silicone I is safe as are other brands that are clearly intended for aquarium use. There is a sticky note that details this subject here on the forum but I can't recall offhand just where it is. If you were to search for safe silicone sealants or something along those lines, I'm confident it will come up.
I hope this helps. Good luck.
Jim