If it is the king referred to, why him specifically? He wasn't the only king who sacrificed his sons to Molech. Ahaz is reported in 2 Kings 16:3 to also have "passed his son thru the fire". Manasseh had repented. Ahaz had not. If Manasseh is a people, is the reference to Manasseh actually Judah, as Ephraim is a reference to the Northern Territory (Israel)?
(NRSV) 2 Kings 23:26 Still the Lord did not turn from the fierceness of his great wrath, by which his anger was kindled against Judah, because of all the provocations with which Manasseh had provoked him. 27 The Lord said, “I will remove Judah also out of my sight, as I have removed Israel; and I will reject this city that I have chosen, Jerusalem, and the house of which I said, My name shall be there.”
One thing to pay attention to is that the anger is against Judah. Manasseh did repent (2 Chronicles 33:13), Josiah did restore the temple and renewed the covenant between Judah and God (2 Chronicles 34:29-33), but Josiah literally died while ignoring God (2 Chronicles 35:22 But Josiah would not turn away from him, but disguised himself in order to fight with him. He did not listen to the words of Neco from the mouth of God, but joined battle in the plain of Megiddo.).
The reality is that none followed God perfectly, and Josiah was the one bright spot in a long line of degenerative Kings of Judah. Israel (Northern Kingdom) incurred God's wrath earlier because they degenerated earlier. Judah took longer to arrive at the same conclusion, but ultimately changed as their kings did. If Josiah had not sought to follow God, Judah would have stayed as corrupt as they were before his reign.
One perspective to remember when studying the Bible is that God's view isn't linear like ours is. He knows and sees what is to come, so His decisions are based on more than what's immediately available in the text/timeline. So His anger was at Judah's continued rejection of Him, before and after the reign of Josiah, in spite of the fact that Manasseh (the King) had repented.
2 Chronicles 36:15 The Lord, the God of their ancestors, sent persistently to them by his messengers, because he had compassion on his people and on his dwelling place; 16 but they kept mocking the messengers of God, despising his words, and scoffing at his prophets, until the wrath of the Lord against his people became so great that there was no remedy.