Stop Zigbee Mains powered device from being a router? (ZHA)

Understand that is really the root cause of your problem, you should not turn off Zigbee Router devices, and following the concept of Zigbee architecture design the best solution would be to instead either remove the attached switch so that devices are not turned off, or an an alternative repace your smart lightbulbs with smart switches instead.

You could maybe try enabling or disabling Zigbee “source routing” if your Zigbee Coordiantor adapter, Zigbee stack firmware, and the zigpy radio library that the ZHA integration uses for it supports it. That could perhaps help but also possibly introduce other issues such as performance lag, i.e. time delay before command message gets through to devices.

zigpy (which is the Zigbee framework library and hardware abstraction layer that the ZHA integration depends on) does however not support blocking of specific devices in order to for example force some specific devices not to be used as a router, nor does it support manually setting a specific source route for a device. While the ZHA/zigpy developers are likely busy with many other things of higher priority or more interest you might want still to consider posting that as a feature request idea to zigpy discussions just to flag it for future reference if nothing else → https://github.com/zigpy/zigpy/discussions

FYI, deCONZ/Phoscon it is possible to set routes manually, but the default and recommend is to use automatic routing as it adapts better to RF oddities, as then when some routers act up with high error rates they fall back in consideration for a new source route. deCONZ/Phoscon does however not either support blocking of specific devices in order to for example force some speicifc devices not to be used as a routers.

PS: Regardless recommend also read and follow this → https://community.home-assistant.io/t/guide-for-zigbee-interference-avoidance-and-network-range-coverage-optimization/515752/