"The fact is that in Azerbaijan there are a lot of identical names, and in order to initially identify them correctly, the name of the settlement is added"

This is not necessary. Already many years ago, the OSM community began deprecating the is_in: tags, and your edits are simply repeating the same deprecated behavior, but without even the processability of a tag.

"The fact is that there are navigation programs that are mainly used in Azerbaijan ... do not accurately reflect some objects, and sometimes they simply do not display them."

The fact that some renders do not display the correct tag is not a reason to use an incorrect tag. If you have been active on OSM for some many years, then I assume that you already know the fallacy of “mapping for the renderer”.  As I map, I will remove these incorrect instances of amenity=townhall.

I understand that you live here and know the local specifics. However, that does not mean that you can map wildly different from the rest of the world. If you have been part of the OSM community, then you may already know instances when a country had one power user whose practices were strange in a global context, and eventually the DWG had to get involved. 