How to disconnect all bluetooth devices before shutdown

I noticed a weird behaviour of my system, when I try to restart my system to my dualboot windows partition. I connected my bluetooth headset to both of my linux and windows partition. However if I wanna restart my PC and switch to the other partition while my headset is connected, after the bootup the bluetooth connection between my PC and my Headset fails and I have to pair it again. This behaviour doesn’t happen if I disconnect my headset before restarting.

Is there a way I can disconnect all my bluetooth devices before any restart maybe? Or is there another way to fix it?