Dynamic port creates a generated port category from an Expression transformation. A static port created in an Expression transformation precedes over generated ports. If a static port and generated port have the same name, the generated port gets renamed. The same is applicable for the header ports. By default, during the runtime, static ports are considered if both static and header port have the same name.
When header and static port names are same, ensure that you link the correct port to the target mapping.