If the deviation from the qiblah is less than 45 degrees, then your prayer is valid, because what you have to do is face the right direction, not face the Ka’bah or Makkah precisely. This deviation does not mean that you have deviated from the general direction.
The fuqaha’ have stated that a slight deviation does not matter, and they explained that the major deviation is deviation from the general direction.
Al-Dardeer said in al-Sharh al-Kabeer (1/227): A large deviation means turning to the east or the west. This was stated in al-Mudawwanah. End quote.
That applies to the people of Madeenah. For people living to the north or south of Makkah, if they turn to the east or the west, then they have deviated from the qiblah.
But for those living west of Makkah, such as the people of Jeddah, the direction of the qiblah for them is east, so if they deviate from that towards the north or the south, or they turn their backs on it, then their prayer is not valid.
The basic principle concerning that is the report narrated by al-Tirmidhi (342) and Ibn Majaah (1011) from Abu Hurayrah (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whatever is between the east and the west is qiblah.” Classed as saheeh by al-Albaani in Irwa’ al-Ghaleel. See also question no. 7535.
Nevertheless, it is better to correct the qiblah of the mosque.
The imam has done well by not telling the worshippers, so as to avoid dissent and too much talk.
You should refer the matter to the authorities to review the direction of the qiblah.
May Allaah help us all to do that which He loves and which pleases Him.
And Allaah knows best.