Sinking a US ship would be a drastic escalation. Iran has done a lot of damage to US assets but inflicted few casualties, demonstrating both capability and restraint. If they destroyed the American boomers' few remaining illusions of supremacy by sinking a ship and potentially killing hundreds of crew, the loss of face would likely instigate a drastic response that could lead to a worst-case scenario. Much better for Iran to keep playing bloody knuckles and force the US and Israel to beg for peace when their missile defenses and appetite for war run dry.
Interesting to see three entirely different responses to my question - but I think I believe this one the most. Not necessarily that they could be successful in attacking (who knows), but that trying would escalate things on the wrong timeline for them. At this point, they actively want to drag this out.
My sense at the moment is they are pursuing a "humiliation" strategy where they will persuade Trump to withdraw by making it too embarrassing to continue. For that, all they have to do is make him look impotent, which they achieve by continuously provoking just enough to force a response (either military, or Trump to issue yet another TACO threat he can't carry through with) but then popping up a few days later with a new attack showing it didn't work.