Issue #3207599: Use WebformYaml::encode to generate YAML string instead of trying to create our own yaml dump