Tammuz seems to be the name of a deity or connected to idolatry. How is it that it became the name of a Jewish month given the prohibition of וְשֵׁ֨ם אֱלֹהִ֤ים אֲחֵרִים֙ לֹ֣א תַזְכִּ֔ירוּ לֹ֥א יִשָּׁמַ֖ע עַל־פִּֽיךָ, namely, that it is forbidden to speak the names of such deities?
Perhaps the answer is that once the month was named after the deity, it is no longer considered the name of a deity but the name of a month. This would also explain our use of the names of the days of the week, such as Tuesday, Wednesday, Thursday, Friday and Saturday, which are all named for pagan deities.
Found a very interesting and profound explanation here: https://www.chabad.org/library/article_cdo/aid/703099/jewish/TammuzTime-for-Transformation.htm