Some thoughts;
Berakhot 8a
מַאי דִּכְתִיב ״וַאֲנִי תְפִלָּתִי לְךָ ה׳ עֵת רָצוֹן״. אֵימָתַי עֵת רָצוֹן — בְּשָׁעָה שֶׁהַצִּבּוּר מִתְפַּלְּלִין.
What is the meaning of that which is written: “But as for me, let my prayer be unto You, Lord, in a time of favor; O God, in the abundance of Your mercy, answer me with the truth of Your salvation” (Psalms 69:14)? It appears that the individual is praying that his prayers will coincide with a special time of Divine favor. When is a time of favor? It is at the time when the congregation is praying. It is beneficial to pray together with the congregation, for God does not fail to respond to the entreaties of the congregation.
וְהַיְינוּ דְּאָמַר רַבִּי חִיָּיא בַּר אַמֵּי מִשְּׁמֵיהּ דְּעוּלָּא: מִיּוֹם שֶׁחָרַב בֵּית הַמִּקְדָּשׁ אֵין לוֹ לְהַקָּדוֹשׁ בָּרוּךְ הוּא בְּעוֹלָמוֹ אֶלָּא אַרְבַּע אַמּוֹת שֶׁל הֲלָכָה בִּלְבַד.
And this concept, that halakha is the most sublime pursuit, is expressed in that which Rabbi Ḥiyya bar Ami said in the name of Ulla: Since the day the Temple, where the Divine Presence rested in this world, was destroyed, the Holy One, Blessed be He, has only one place in His world where he reveals His presence exclusively; only the four cubits where the study of halakha is undertaken.
5. Rama, O.C. 68:1; 90:18. See Shulchan Aruch ha-Rav 124:10, who writes that talking while the congregation is praising Hashem is a form of blasphemy
Etc
If it's clearly against halacha and shulchan aruch, why is talking allowed in shul?