I think what you’re missing is that a nuclear submarine wouldn’t let a UUV “follow it indefinitely.” Also, the submarine can have its own fleet of UUVs.
Also I suppose the sub could re-enter its own coastal waters and then do it too, much as we shot down China’s spy balloon.
[1] Annie Jacobsen, "Nuclear War: A Scenario"