This is due to a bug in Golang yaml:
go-yaml/yaml#923
As feedback from a community user:

Note: we had a mistake to not adding yaml annotation, but even we added it, it still won't work well because all the fields under WorkerOptions are not annotated either.
So potential solutions:
- switch to a different yaml library that can work as expected like the cases in JSON
- duplicate the WorkerOptions from Temporal/Cadence SDK and add yaml annotation properly
- [less likely] ask temporal/cadence to add yaml annotations