Modern BLE devices alter their MAC address with each new pairing.Hence your script doesn't find the in OS1 paired device in OS2.
Just copy the setup in OS2 (Linux) to a folder with the MAC address as used in windows helps:
First
sudo cp -r /var/lib/bluetooth/<adapter>/<in-linux-paired-MAC> /var/lib/bluetooth/<adapter>/<in-windows-paired-MAC>
and then run your script works.
Modern BLE devices alter their MAC address with each new pairing.Hence your script doesn't find the in OS1 paired device in OS2.
Just copy the setup in OS2 (Linux) to a folder with the MAC address as used in windows helps:
First
and then run your script works.