Shemos 14:1-4:
וַיְדַבֵּר יְהֹוָה אֶל־מֹשֶׁה לֵּאמֹר׃ דַּבֵּר אֶל־בְּנֵי יִשְׂרָאֵל וְיָשֻׁבוּ וְיַחֲנוּ לִפְנֵי פִּי הַחִירֹת בֵּין מִגְדֹּל וּבֵין הַיָּם לִפְנֵי בַּעַל צְפֹן נִכְחוֹ תַחֲנוּ עַל־הַיָּם׃ וְאָמַר פַּרְעֹה לִבְנֵי יִשְׂרָאֵל נְבֻכִים הֵם בָּאָרֶץ סָגַר עֲלֵיהֶם הַמִּדְבָּר׃ וְחִזַּקְתִּי אֶת־לֵב־פַּרְעֹה וְרָדַף אַחֲרֵיהֶם וְאִכָּבְדָה בְּפַרְעֹה וּבְכָל־חֵילוֹ וְיָדְעוּ מִצְרַיִם כִּי־אֲנִי יְהוָה וַיַּעֲשׂוּ־כֵן׃
And Hashem spoke to Moshe saying, "Speak to Bnei Yisrael, and they will settle and camp before Pi HaChiros, between the tower and the sea, before Ba'al Tzefon, opposite it, will you encamp on the sea. And Paroh will say of Bnei Yisrael, 'They are lost in the land; the desert has sealed them in.' And I will strengthen Paroh's heart, and he will chase after them. I will be honored through Paroh and his army, and Mitzraim will know that I am Hashem." And so they did.
Rashi makes a point regarding the existence of Ba'al Tzefon at this point in the narrative:
לפני בעל צפן. הוּא נִשְׁאַר מִכָּל אֱלֹהֵי מִצְרַיִם כְּדֵי לְהַטְעוֹתָן, שֶׁיֹּאמְרוּ קָשָׁה יִרְאָתָן
"Before Ba'al Tzefon" - it was left of all the gods of Mitzraim in order to lead them astray, so that they would say their god is difficult [to destroy].
Yet Paroh's response to this maneuver makes no mention of their idol (v. 5):
וַיֻּגַּד לְמֶלֶךְ מִצְרַיִם כִּי בָרַח הָעָם וַיֵּהָפֵךְ לְבַב פַּרְעֹה וַעֲבָדָיו אֶל־הָעָם וַיֹּאמרוּ מַה־זֹּאת עָשִׂינוּ כִּי־שִׁלַּחְנוּ אֶת־יִשְׂרָאֵל מֵעָבְדֵנוּ׃
And it was told to the king of Mitzraim that the people had fled. Paroh's and his servants' hearts changed regarding the people, and they said, "What is this that we have done, that we sent Yisrael from serving us?"
In the subsequent verses, Paroh gathers his army and begins pursuing Bnei Yisrael.
Seemingly, this maneuver was entirely unnecessary. Paroh responded to the fact that Bnei Yisrael weren't coming back (perhaps he still thought they were only taking a three-day journey); the fact that they were lost in the desert played no role in his response, and certainly not the fact that Ba'al Tzefon was present. So why was it necessary for Bnei Yisrael to do this?