This answer is for Postgres 14. pg_basebackup
takes backup of the entire data directory. https://www.postgresql.org/docs/14/app-pgbasebackup.html states that the backup utility will skip all directory/file that are symbolic links. So, that could be a workaround to get only desired content into the tar ball.
I had faced similar situations where I wanted to exclude the content of multiple directories like pg_replslot,pg_dynshmem, pg_notify
etc. I made the tar ball the usual way: pg_basebackup -D /backup/ -F t -P -v
. After the tar ball was made, and before restoring it to another server, I updated the tar manually by excluding content of all the required directories.