The Book of Joshua

On the surface, the book of Joshua draws a hard-and-fast distinction between Israelites and Canaanites. The book seems to advocate the removal of the Canaanites from the land lest they jeopardize Israel’s covenant with YHWH. But evidence from the book itself, as well as from archaeology, suggests that this distinction was not strictly maintained. What is the evidence? What then does the book have to say about religious exclusivity?