How would it deter Russia if such weapons are not to be used under any circumstances?
They could be used, if existence of Ukraine was threatened. Russian storm troopers in Kiev, or nukes used against Ukraine are two such options. By taking the very possibility of a military victory (mutual destruction is by definition a draw) away from mr. Putin, you automatically put a cap as to how far he'd be willing or able to escalate the conflict.
Besides, Russia also has nuclear weapons of course, and would they be a deterrent to the attacks that you favour Ukraine makes on Russia's fleet?
The attacks on Russian fleet would only be conducted in the event of a full-scale invasion of Ukraine. Putin has bragged he could be in Kiev in three weeks if he did so, so it is a scenario that must taken seriously. It's just a way of putting a much, much greater price tag on an invasion. It's not a viable deterrent against nukes, but it is a viable deterrent against a full-scale invasion. It's similar to those pre-placed IEDs I mentioned. His army could still overcome both threats of course, but the losses would be too high even for his PR machine to explain, and for his country to bear (ships are costly and take time to build, plus tend to take lives to dozens to hundreds of sailors in one strike).
McHrozni