Soap leave a residue that can pollute the tank and kill fish, however, if the item is rinsed well with vinegar it will cut the soap residue making it fish safe unless it is material that absorbs the soap residue to the point that the vinegar can't cut it.
Diluted bleach 20 part water to 1 part bleach is safe as long as you rinse well and use a dechlorinator to clean tanks.
You never use bleach diluted or not directly in a tank with any live stock
Vinegar can be safe in low doses used directly in the tank with fish
In the nearly 30 years I have been working with fish and aquariums I have used diluted bleach and/or vinegar to clean, nuke... tanks and related items before use without issues/deaths/injury to fish and related livestock....