I tried, here’s what happens:
$ fastboot flashing get_unlock_ability
< waiting for any device >
fastboot devices also does not return anything. adb devices shows my phone.
I suppose the fastboot command needs to be executed from the bootloader, after “adb reboot bootloader” was executed?