Let me see if I understand. Moses is a myth but King Josiah was real. The stories in the Bible were made up but Jesus was a real figure. We can't trust what was written but we believe what it says about the Canaanites. The history isn't true but we accept its accounts about "in war time people would rally around Yahweh but still holding on to polytheism".
So you have basically said everything that is written in the Tanakh but we don't accept it as historical data.
Got it!!
Frustratingly Josiah is known only from the Tanakh. But Judah was in existence and we have external records of it having kings before and after until the Babylonians took over the place and carted the nobility and choice bits of the population off to weep by the Euphrates. Note though it is this otherwise unrecorded king in a lacuna of history who gets brought the "found" Deuteronomy and "reforms" the religion into a recognisable monotheistic form.
Yahweh was the national God, in a pantheon with other Gods that were Gods to other nations. He appears to be a storm god from Midian way, brought into the Canaanite pantheon as the fictive son of El. Like a lot of these national gods, Baal for instance, he eventually usurped or became merged with El. "Though shalt have no other Gods..." doesn't mean there were no other gods, only that Judah made damn sure they worshipped this particular god first and foremost. The same would apply to the other gods in the other kingdoms.
No we don't believe what it says about the Canaanites. Firstly because they are indistiguishable from one another (Hebrew and Phoenician are Canaanite dialects) and secondly most of what is written is tedentious propaganda written as much as one and a half millenia after the events it portrays. We can only cross check, and that in broad details only, when Israel and Judah come into contact with and are mentioned in other peoples records. The Assyrians for instance.
We have found records from Moab of their god Chemosh being described much as Yahweh is in Kings; giving his people into Israel's hands when they displeased him and restoring their fortunes when they came back to him. His cult shows up in Jerusalem, just as Yahweh's shows up elsewhere than Jerusalem and Samaria. We can cross-reference this material with the Tanakh. It is at these points of contact that we can put any trust in in the Tanakh and only these points of contact and inference.
The Israelites and Judeans rallied around Yahweh and Yahweh was seen to lead, admonish or reject them as Chemosh and Baal were seen to lead admonish or reject their peoples. 1-2 Kings are hostile and much later than they purport to be but time and time again the people are worshipping other gods as well as Yahweh and most of the time Yahweh has a wife, Asherah, just as all the surrounding deities do. Most of this is apparent even in KJV which obscurs much. Go to any of the better translations and you will see more. Better yet read a decent Bible commentary or apparatus.
Everything before Ahab is taken as legendary or mythical because we have no evidence
for any of it and large amounts of evidence from numerous different sources and several different disciplines
against it. We are not just making things up or relying on things that other people made up for their own reasons thousands of years ago, in an alien culture with alien values.
I have read the arguments and considered the evidence and find it very improbable that Jesus existed; but even on the possibly one in twelve thousand chance Jesus did exist, all the material in the Gospels about him can be accounted as fiction and that is a mainstream argument. Just go and ask anyone who came out of a seminary, apart from Evangelicals and others of a conservative bent, in the last fifty years. That a lot of scholarship doesn't quite reach the pews is a shame.
Edited because the last para was misleading.