I think you will find there is disagreement about whether any part of the bible actually is ahistorical, compared with any other historical text of each scroll's original epoch. Attacks on various parts vary as scholars are disproven and fashions for how to disbelieve the various parts of the bible change among theologians, priests, bishops, trendy cardinals, and scholars. Religious texts do not fit the definition of non-fiction whether you personally believe them or not. The qur'an is non-fiction. The bible is too.
Fiction is 'literature in the form of prose, especially novels, that describes imaginary events and people' (Oxford).
Is the bible in the form of prose? The events of early Genesis certainly aren't, they are a poem (the creation story, in particular, as scholars would tell you, seemingly compares God creating the world with a mason building and furnishing a temple, while the story of Adam and Eve has a different chronology of events a chapter later; Both, it seems from observations of scholars, follow the form of poetry with concepts rather than time determining order of events).
Is it a novel or a book of novels? No.
If it were myth, or a book of myths, though the historical evidence does not lean that way, myths are nonetheless non-fiction, even if they are not true.
Are the events and people imaginary? Some may be, but on the whole they are historical, and those which are doubted are doubted by scholars, theologians, priests and bishops who would not approach any other historical source with the same degree of scepticism.
Modern scholars believe the events of Homer's Iliad and Odyssey really happened, despite some parts being clearly fantastical.
In contrast, biblical scholars will insist silly things, like that the bible did not mean Moses actually parted the Red Sea but that he lead the Israelites through some marshes instead, despite the book of Joshua describing the river before Jericho being stopped up and the water gathered like a wall, and the bible referencing what Moses had done so soon before by parting the Red Sea as being the same thing.
Really, the great virtue signal among all the most gleefully secular and liberal Catholics is how greatly they can signal their unbelief and that despite it, they remain Catholic. Personally, I would not see such a contradiction as virtuous, but I am a G.K. Chesterton/C.S. Lewis kind of Catholic Christian. I believe based on the rational arguments which have convinced me of and into my own positions.
If you want a secular source on the matter, this is how a librarian would list books of religion and mythology:
'“Are myths fiction or nonfiction?”
'The answer probably depends on who you ask and why. I imagine that if you ask an atheist, you’ll get the answer “fiction”. But in the wonderful world of the Dewey Decimal System, books (and other media) on mythology are in the 200s, the category for philosophy and religion. So for straight mythology or books about mythology, it’s considered nonfiction. Poetry (like Homer’s Odyssey will generally end up in the 800s, with other books of poetry. Yes, poetry is considered nonfiction.' Monster Librarian, 'Are Myths Fiction or Nonfiction?', 19 October 2017. https://www.monsterlibrarian.com/TheCirculationDesk/help-a-reader-out-are-myths-fiction-or-nonfiction/
To conclude: the bible, whether by Oxford's definition or by the standards governing libraries in the Western World, is a non-fiction book. As for whether it portrays true events or not, that is more complicated, and debates over that among serious people, will remain as long as the bible remains in the realm of discussed matters in the world we occupy.