I believe I read something years ago that made a pretty convincing argument that Barnabas could not have written Hebrews, but I don’t remember what the argument was. Martin Luther suggested that it was written by Apollos and made some good points, some have also made good arguments that it was written by Clement of Rome. I don’t think any scholars actually believe it was written by Paul, though many Christian leaders adhere to Pauline authorship based on tradition.
Barnabus traveled extensively with Paul and was taught by him. they were so close that the Greeks thought they were Greek gods, Daman and Pythias. Barnabus was an educated Greek Jew, and the Epistle to the Hebrews, when studied, shows itself to be written in a cultivated Greek style.