TT #183 · Parashas Shoftim · Fifth Aliyah · Passuk 18:15
A prophet from among you, from your brethren, like me, the Eternal your God will raise up for you; to him you shall listen.
Torah Temimah points to Sifrei Devarim 175 / Sanhedrin related.
TT lemma: אֵלָיו תִּשְׁמָעוּן.
Sefaria — Sifrei Devarim 175 / Sanhedrin related
English: ‘To him you shall listen’ – even if he tells you to transgress one of all the commandments of the Torah temporarily.
Derash on the binding force of prophecy (Sifrei) — the command to listen is absolute for a verified prophet.
Once a prophet is established as true, the people are obligated to heed him, even regarding a temporary directive that appears to suspend a mitzvah.