If it is a simple zone, then the node will have the IP that is configured as gateway. Same for an EVPN zone. In the other zones the gateway setting does not have any effect since they only operate on L2. In that case you need to manually configure it in the interfaces file.