Hello @tomaskuba ,
Welcome to the Freshworks Community
If I am understanding you correctly, you are trying to manually paste a yml code snippet into a freshdesk ticket reply using the Insert Code option in the text editor. I tried doing the exact same thing and the format was preserved(Attaching Screenshot). You can use this example file to copy and paste for confirming if this issue is due to your IDE. In case it is you can format it into a different code editor before you paste in the freshdesk ticket. You can share the yaml file (without any confidential data) so that I can check it at my end too with your file.