So I've got Xiaomi Airdots 2 Pro which support LHDC.
However when I select LHDC as current Bluetooth codec, it switches back to SBC or AAC when these headphones are connected.
Is it a bug?
Because no one said that LHDC is usable on your devices yet. You shouldn't be messing around Developer options, the settings there are not meant for you and it's not the standard way to use LHDC. The support for LHDC is displayed in Bluetooth devices list, whenever it's supported.
P.S. The only device that has LHDC codec libraries is Mi 9 Pro 5G (crux), from what I could find.