Authorship is completely irrelevant. Do we really know who Mark or Luke were? (answer: Nope). Who wrote the Book of Deuteronomy? Was it Moses? (it is, after all, one of the “five books of Moses”). Then it seems kinda odd that Deut 34 records the death and burial of Moses. Did Moses write about his own burial?
Who was St. John the Divine (the author of Revelation)? We have absolutely no idea.
Does any Scripture scholar claim that the person who wrote the Epistle to the Romans was the same person who wrote the Epistle to the Hebrews? St. Paul is attributed as the author of both, but you cannot find a single reputable Scripture scholar who will say that both epistles are the work of a common author.
Authorship is completely irrelevant. We have absolutely no idea who wrote the large majority of Sacred Scripture. At best, we might have a name, and nothing else. And maybe that name is not even correct. But it doesn’t matter - authorship is completely irrelevant.
The ONLY thing that matters is that the Catholic Church has canonized particular works, thus declaring them to be inspired by the Holy Spirit (regardless of, and without reference to, the particular author).