Actually, after poking around further, it seems it's not builds, but only this shebang I've been using where it happens. ghc-turtle depends on ghc-foldl which depends on ghc-profunctors.

#!/run/current-system/profile/bin/env -S guix shell ghc@9.2 ghc-turtle -- runhaskell

But, packages I use like kmonad use depend on packages that still list the store path with the empty .so as a reference, along with other Haskell programs. I am not really sure how they still work.