According to Eikhah Rabba 1:53, the "repentance" was not complete. Apparently they agreed with the elimination of state sponsored or public idolatry, but when it came to their own homes, many schemed to get past the king's laws:
והוא לא היה יודע שכל דורו עובדי עבודת כוכבים היו? הוה משלח זוג תלמידים למיבערא עבודת כוכבים מבתיהון, והוון עללין ולא משכחין כלום. עד דנפקון אמרון טרודו תרעין מן דהוון טרדין לתרעיה, הוון חמן יתיה אמרו עליהון: מן דאתא ותיקן הוא, דאתא וקלקל
... and he [Yoshiyahu] did not know that his entire generation worshipped idols. What did the scoffers of his generation do? They would put half of the [idolatrous] form on one door, and half on the other door. [Yoshiyahu] would send two wise men to purge their homes from idols. They would enter, but find nothing. As they left, [the scoffers] would have them close the door, so that, on the inside, the idols would be reattached.
Even though changing the complexion of the thoroughfare was no small thing, Yoshiyahu ends up paying for his overconfidence. He should have consulted with Yirmiyahu, who would have told him to let Par'oh Necho travel through Israel. (Taanis 22b) After all, the navi's advice wouldn't be based on guessing what the state of the public mind was.
The medrash continues.
לפיכך, (דה"ב ל"ה) ויורו היורים למלך יאשיהו אמר רבי מני: שלש מאות חצים הורו בו, עד שנעשה גופו ככברה, והיה ירמיהו מצית אחריו לידע מהו אומר, ומה היה אומר? צדיק הוא ה' כי פיהו מריתי, פיהו ופום סרסורו.
Therefore "The archers shot into King Yoshiyahu" (Divrei haYamim 35). Rabbi Mani said, "They shot 300 arrows into him, until his body became like a sieve. Yirmiyahu stayed after with him to know what he was saying. And what was he saying, "Hashem is just, because I rebelled against His Word." His Word, and the word of His emissary.
(C.f. Moed Qatan 28b, which also uses the gruesome "like a sieve" imagery.)
This story is reflected by Ashkenazim in a qinah written by R Eliezer haKalir,* "Eikhah Eli Qonenu". It is an alef-beis acrostic, and the dalet line reads:
דָּבַק בּוֹ חֵטְא לֵיצָנֵי הַדּוֹר. אֲשֶׁר קָמוּ אַחַר הַדֶּלֶת לִסְדֹּר
The sin of the scoffers of the generation attached itself to him; that they established to be set up behind the door.
So, to some up: There was national repentance, but not enough individuals cleaned up their personal lives. And Yoshiahu, in his hubris, was so sure of his own success, he didn't even think the question was worth asking the navi.
(* If a Sepharadi can mention whether they say something similar, it would be appreciated.)