I can’t avoid contributing to work projects though.
The identity working with the code doesn't have to match the code.
Are you saying they will ban some "foo" account if it pushes code into a repo where some of the commits are authored by some user "Non Grata <bar@whatever.com>"?
Or how does it work?