The issue is in that zabbix_agent2 creates sockets before processing, say, runtime commands. As a result, you run into what happens in
ZBX-22069, where the socket created by the running agent as part of a managed service gets replaced by a socket created by the agent run by the system administrator to execute a runtime command.
Reproduction steps can be found in the linked issue. As I already mention there in, runtime commands should be processed earlier and sockets should be created later.