I'm also having this bug since I upgraded to Android 10. I had the stock Android 10 ROM and a couple of days ago I "upgraded" to the xiaomi.eu ROM hoping to solve this bug but the problem persists.
On Android 9 (stock) I didn't have this problem and always had the flashlight on AI double click.