The US still conducts deniable operations.
This strike was about sending a message: the US has undergone a fundamental change of doctrine.
They will leverage their supreme technological advantage to target the regime in Iran (and other states), rather than engage in long-running proxy wars. They will target the people directing attacks and threats on Americans and their assets, rather than the foot soldiers.
And the US wants the message sent by the attack to be as loud and clear as possible. Denying involvement would only muffle and confuse the message.
There is also a pragmatic reason too (which you allude to) - only a handful of nations have the technology to target a moving vehicle with such accuracy. A denial would be easily seen for what it was, and the US would look weak (not to mention a liar).
And a different strike method (eg. poisoning, sniper) would have necessarily involved substantially more risk to US assets.