It can, but that's another type of "shallow", or more exactly "not-deep" cloning, called blobless cloning [1]. There is also treeless cloning, with other tradeoffs, but much to the same effect.
I found this[2] very enlightening.
[1] https://github.blog/open-source/git/get-up-to-speed-with-par...
[2] https://www.howtogeek.com/devops/how-to-use-git-shallow-clon...