Heh, that seems to be quite a funny edge case here. The value of the auto-detected service name (authentication-api-node2.jar -> authentication-api-node2) is the same as the explicitly set value (-Delastic.apm.service_name=authentication-api-node2). That's why the agent thinks the agent name has not been set explicitly which makes it look for a more appropriate value, which it found via the spring.application.name.
I'll change the logic which detects whether the value has been explicitly set. In the mean time, just set the explicit service name to a value which is different than authentication-api-node2.
Alternatively, use authentication as the service name for all your nodes and use the environment setting to differ between them.