Documentation regarding YAML usage in pod templates and merge of values seem to be contradictory.
When using declarative pipelines, YAML definitions are recommended and containerTemplate is deprecated. However, since raw YAML is not merged, it seems that most of the documentation talking about inheritance does not apply when using YAML in declarative pipelines.
This issue could be documented explicitly. In particular, when recommending to use YAML in declarative pipelines, it should be warned that inheritance of YAML will not work, and that using containerTemplate is actually the only way to use raw YAML from a parent template.