Comments are just ignored probably when WF reads the config file. When something changes, the config file is written to disk and comments are gone.
AFAIK there is no way to avoid this.
My strategy here has always been to write a CLI script to perform the configuration.
This has a number of benefits:
- It makes the process of server configuration easily repeatable
- You can parameterise it for different environments
- It's much easier to place in source control - the server not's changing it on you all the time
- You can add as many comments as you want!
- Did I mention repeatability?