“Switch”? I assume that what you mean is that you physically moved a mains-powered Zigbee Router (ZR) device product (like an IKEA Trådfri Wireless Outlet smart power-plug) from one area/location in your house to a different area/location in your house, or? …“switch” means a switch device class in the world of Home Assistant → https://www.home-assistant.io/integrations/switch/
Zigbee network uses mesh technology which means it remembers its neighbours + last connection paths and it usually takes about 1-hour before a Zigbee End Device (ZED) and Zigbee Router (ZR) devices will try to reconnect via a different path if you physically move them to a new location in your home, which is why it is generally recommended to pair Zigbee devices in the final location or manually re-pair them if you move them, even though simply power-cycling the Zigbee device will work for many products from most manufacturers (there are however so many different Zigbee device hardware platforms and developer choices that each device can be unique in the way that work). Read the best practices here → https://www.home-assistant.io/integrations/zha#best-practices-to-avoid-pairingconnection-difficulties
Blakadder and Zigbee2MQTT both have community-maintained device databases that try to collect tips about unique pairing, information, and issues about specific devices, check them out to lookup specific device(s) → https://zigbee.blakadder.com and https://www.zigbee2mqtt.io/supported-devices/
Regardless it is also always recommended to use best practices to avoid interference and optimize your Zigbee network mesh by adding a few “known good” Zigbee Router devices as a combination of interference and/or poor reception is often the root cause for intermittent issues → https://www.home-assistant.io/integrations/zha#zigbee-interference-avoidance-and-network-rangecoverage-optimization
Suggest that you also read and follow an extension of those tips here → Zigbee networks: how to guide for avoiding interference and optimize for getting better range + coverage
Otherwise, it is kind of hard to know exactly what you mean because you are not using the correct terminology for Zigbee, (which is understandable since its terminology differs from other common technologies), and that makes it difficult for others to help troubleshoot. Please try to use the correct terminology for Zigbee if the future, see → https://www.home-assistant.io/integrations/zha#introduction (and perhaps even consider reading https://en.wikipedia.org/wiki/Zigbee).
For example, when you write “ZigBee client” do you mean the ZHA (Zigbee Home Automation) integration which is really the “Zigbee gateway” (as in the application layer implementation which architecturally speaking would be the controller with the Zigbee Coordinator being the “master” as Zigbee devices which need a Zigbee gateway application to work with a Zigbee Coordinator). Zigbee does not use a server-client model architecture so saying “ZigBee client” does not make sense and it will not help you if people have to guess from context what you mean. Help us help you!
And when you write “relay” do you mean a “Zigbee Router” (ZR) device which is sometimes referred to Zigbee signal repeater or Zigbee signal extender (which most mains-powered devices normally are)?
Also assume that you referring to Zigbee Coordinator USB adapter when you write “slae.sh ZigBee device” you mean your “Zigbee Coordinator” USB adapter (as in the RF gateway/bridge and central controller or “hub”)?
And I assume that you mean “join mode” or “pairing mode” when you write “search mode”?