I searched already on Stack Overflow. But I did not expect to find the solution in the source code. Thanks for the answer. I'm also respecting the file extension in the future.
Used versions: ruamel.yaml==0.18.5 ruamel.yaml.jinja2==0.2.7
String quotes are unexpectly removed