As veeceeoh noted, I don’t think it’s possible to disable the “repeating”/routing functionality of a bulb. That is likely something that would have to be done in firmware. I see you mentioned Xiaomi devices were the (only?) ones you were having problems with. In my experience, Xiaomi devices are reluctant to change routes–if I pair mine through the hub, they try to stay paired to the hub (probably why most people recommended pairing them this way initially). If I pair them through a specific repeater (something you can’t force but can encourage–and verify with XCTU), they tend to stay routing through that one. Some people have noticed that they do change routes, but I’ve never noticed any of my Xiaomi devices do that (may depend on chance, your Xiaomi devices, or your routers). This is in contrast to regular ZHA devices, which will change routes if they can’t find their router (or the hub/coordinator).
So, if my observations are also correct for your network, one way you can avoid this problem is not pairing Xiaomi devices through Trådfri bulbs that you think you’re going to turn off. Hopefully you have other repeaters that work well in this case (or slots left on the hub). The other solution, of course, is just to not turn them off.