This is because the "gn" sound in French is represented by the letters "gn" only when followed by a vowel. For example:
* Gnon: This is a noun meaning "a lump, a knob".
* Gnaquer: This is a verb meaning "to gnaw".
However, in words like "champagne" or "cognac", the "gn" is not pronounced as a "gn" sound. They are pronounced as "sham-pahn" and "koh-nyak", respectively.
Let me know if you have any more questions!