If this issue is about Bluetooth *sound* disconnecting on locking, I believe this is likely an undesired interaction between light-locker's VT-switching for integration with lightdm [1] and per-user Wireplumber's disconnecting Bluetooth on VT-switches (unless both VTs are owned by the same user) [2].
[1] https://github.com/the-cavalry/light-locker/blob/master/README.md [2] https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/bluetooth.html I don't have great ideas for a platform/code-level fix, but felt some information on the mechanism might be useful here.

