I don't know if the PG developers are aware of this:
https://serverfault.com/questions/1081642/postgresql-13-speed-up-pg-dump-to-5-minutes-instead-of-70-minutes
But this question is quite famous and many users like the solution.
So maybe you can fix it by changing the pg_dump process to not compress
any bytea data.
regards
Janning