Messing with the mesh can be problematic sometimes. I would just leave them plugged in.
However, if you want to save power or the like you probably need to exclude the devices before unplugging them. After a time the controller will mark them as dead because of a lack of contact for so long of a time. I’m not sure what will happen if a node marked as dead suddenly comes back after a long time.
I’ve done both. Meaning just unplugged and stored them with the lights, and also left them plugged in an unused outlet. As Rich says, “sometimes” is correct. I’ve had mesh problems sometimes, others times not. I have avoided the issue by switching to Matter plugs. Since they are wifi, no risk of compromising mesh performance. Just unplug and keep them stored with the lights, then disabled the Things in OH. I’ve seen TP Link plugs in a 3 pack for as low as USD $20. Outdoor versions can be a bit more, but not prohibitive.
Since years in Spring I remove the batteries from my radiator thermostats and deactivate the corresponding things.
I configure a healing during the night on the controller thing - and doing the opposite in Autumn.
Never had any issues in the mesh doing so.
The mesh is only a fallback if the controller can’t reach to node directly. If you unplug (saves a watt or two) and run a network heal they won’t be included in routes to other nodes. When they are plugged back in, they should come right back online. Battery nodes are never part of a routing path between the controller and another node.