Mario Galaxy was linear, but I felt it very open, unlike Super Mario 64, which was like being in a literal sandbox.
I can't say about Mario Sunshine, since I didn't play it.
Super Mario 3D World/Land are very linear, but when I play them, I don't feel that limited feeling I have in SM64.