Astute class SSNs can do wonders from significantly longer range that F-35 can only dream of...
Well, actually...no.
The F-35B can be refueled while in flight, so it's range is virtually unlimited.
So, it can carry its attack missiles, whether Anti-shipping or Land Attack, as far as necessary, being refueled along the way if necessary, within its weapons bay in stealth mode, and then launch them from their significant standoff range.
As I said, the Astute is not meant to replace the wing of F-35B aircraft in their attack role off of the carrier. Nor should they.
Having said that, the Astute SSN does have its own attack capabilities which are also impressive with the Tomahawks it can carry. It can also approach its targets in "stealth" mode under the waves and launch its missiles.
The two compliment each other. They each have their place and their unique capabilities. Although the Tomahawk Black IV missiles themselves will certainly have a greater range than the NSM or LRASM or other missiles the F-35B can carry, because the F-35B can be refueled in flight, it can make up for that whenever necessary.