Contradiction with Deuteronomy 20:16-17
This passage commands the complete destruction of certain cities, whereas Joshua 8:23 involves taking the king alive, showing a different approach to dealing with enemies.
Deuteronomy 20:16-17: But of the cities of these people, which the LORD thy God doth give thee [for] an inheritance, thou shalt save alive nothing that breatheth:
Contradiction with Joshua 10:28
This verse describes the complete destruction of a city and its king, which contrasts with taking the king of Ai alive in Joshua 8:23.
Joshua 10:28: And that day Joshua took Makkedah, and smote it with the edge of the sword, and the king thereof he utterly destroyed, them, and all the souls that [were] therein; he let none remain: and he did to the king of Makkedah as he did unto the king of Jericho.
Contradiction with 1 Samuel 15:3
Here, Saul is instructed to destroy all, leaving nothing alive, which contrasts with sparing the king in Joshua 8:23.
1 Samuel 15:3: Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass.
Contradiction with Joshua 2:13
Rahab's plea for her family's life and its sparing contradicts the act of capturing a leader in Joshua 8:23, highlighting an inconsistency in the fate of foes.
Joshua 2:13: And [that] ye will save alive my father, and my mother, and my brethren, and my sisters, and all that they have, and deliver our lives from death.